├── .DS_Store ├── Code ├── .DS_Store ├── p1.Rmd └── EDA Final.Rmd ├── DPA Project Proposal.pdf ├── Dataset ├── crypto_data.xlsx ├── ETH Historical Data.csv ├── BTC Historical Data.csv ├── Bitcoin.csv └── historical_pricing.csv ├── Project Plan & Detail.pdf └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashleshk/Graduate-Data-Preparation-and-Analysis/main/.DS_Store -------------------------------------------------------------------------------- /Code/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashleshk/Graduate-Data-Preparation-and-Analysis/main/Code/.DS_Store -------------------------------------------------------------------------------- /DPA Project Proposal.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashleshk/Graduate-Data-Preparation-and-Analysis/main/DPA Project Proposal.pdf -------------------------------------------------------------------------------- /Dataset/crypto_data.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashleshk/Graduate-Data-Preparation-and-Analysis/main/Dataset/crypto_data.xlsx -------------------------------------------------------------------------------- /Project Plan & Detail.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ashleshk/Graduate-Data-Preparation-and-Analysis/main/Project Plan & Detail.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Cryptocurrency Market Evaluation 2 | # Facilitation of Cryptocurrency Price Prediction by Sentiment Analysis 3 | 4 | ### Project Description 5 | 6 | Cryptocurrency is a dynamic and rapidly changing market, making it difficult for investors to make informed decisions. Sentiment analysis has emerged as a promising tool for analyzing the emotional tone behind news articles, social media posts, and other online content related to cryptocurrency. In this project, we aim to explore the use of sentiment analysis to facilitate cryptocurrency trading decisions. To achieve this goal, we scraped data from various news articles and collected price data for several cryptocurrencies during a specific time period. Using exploratory data analysis, we identified which cryptocurrencies to focus on and selected a few for further analysis. We implemented a machine learning model to predict price changes based on sentiment extracted from the text of news articles. Additionally, we conducted a time series analysis to further understand the relationship between news sentiment and cryptocurrency price movements. 7 | 8 | ### What we seek to Address 9 | 10 | - Does historical data of BTC, ETH, status, or ratings influence this result? 11 | - How were cryptocurrencies trending during that period? 12 | - What were the top 10 cryptocurrencies and their market capitalization at that time? 13 | - Do the total traded Quantity and Close Price of the coin hold any sort of relation between them? 14 | - Which analysis model will be best for the analysis of the dataset? 15 | - Can we analyze price movements and trading volumes and give 7-day predictions? 16 | 17 | ### Datasource 18 | For this project, we utilized two primary categories of data. 19 | - The first type consisted of Investing.com's historical price data for 10 cryptocurrencies, which included Binance Coin, Bitcoin, Cardano, Dogecoin, Ethereum, Polkadot, Solana, Tether, USD Coin, and XRP. 20 | - The second type of data utilized in this project was 360 news articles from five different crypto news sites, including Bitcoin, CNBC, CoinDesk, Cointelegraph, and Forbes. 21 | 22 | 23 | -------------------------------------------------------------------------------- /Dataset/ETH Historical Data.csv: -------------------------------------------------------------------------------- 1 | "Date","Price","Open","High","Low","Vol.","Change %" 2 | "Apr 10, 2018","415.12","398.84","417.90","391.00","146.65K","4.09%" 3 | "Apr 09, 2018","398.79","400.33","430.73","387.31","329.86K","-0.39%" 4 | "Apr 08, 2018","400.34","384.16","404.07","384.16","134.99K","4.21%" 5 | "Apr 07, 2018","384.16","369.74","394.59","368.85","143.72K","3.90%" 6 | "Apr 06, 2018","369.73","380.99","385.44","363.03","151.02K","-2.95%" 7 | "Apr 05, 2018","380.98","378.00","387.10","366.12","182.50K","0.79%" 8 | "Apr 04, 2018","377.99","415.41","416.54","369.82","256.60K","-9.01%" 9 | "Apr 03, 2018","415.43","386.16","417.88","379.83","223.28K","7.76%" 10 | "Apr 02, 2018","385.50","378.68","393.99","375.26","196.17K","1.80%" 11 | "Apr 01, 2018","378.67","393.37","398.84","358.01","325.75K","-3.64%" 12 | "Mar 31, 2018","392.97","393.08","418.50","389.00","273.24K","-0.03%" 13 | "Mar 30, 2018","393.09","384.10","411.12","364.66","501.96K","2.34%" 14 | "Mar 29, 2018","384.11","445.37","448.00","379.60","470.08K","-13.75%" 15 | "Mar 28, 2018","445.37","448.19","465.52","439.99","165.08K","-0.55%" 16 | "Mar 27, 2018","447.85","485.20","491.35","446.10","310.88K","-7.66%" 17 | "Mar 26, 2018","485.00","522.41","525.37","466.90","224.43K","-7.16%" 18 | "Mar 25, 2018","522.41","519.05","535.65","513.06","81.71K","0.70%" 19 | "Mar 24, 2018","518.80","543.86","545.24","518.00","108.76K","-4.51%" 20 | "Mar 23, 2018","543.28","539.20","543.66","505.72","193.13K","0.76%" 21 | "Mar 22, 2018","539.19","559.22","577.27","515.36","181.65K","-3.72%" 22 | "Mar 21, 2018","560.04","556.38","590.00","544.59","185.47K","0.66%" 23 | "Mar 20, 2018","556.38","555.00","566.28","516.09","226.63K","0.25%" 24 | "Mar 19, 2018","554.99","536.73","557.99","514.95","346.87K","3.40%" 25 | "Mar 18, 2018","536.73","548.82","560.99","453.65","661.85K","-2.23%" 26 | "Mar 17, 2018","549.00","598.77","609.36","543.30","141.33K","-8.43%" 27 | "Mar 16, 2018","599.56","609.91","626.04","584.50","133.52K","-1.70%" 28 | "Mar 15, 2018","609.90","610.91","619.82","568.29","223.87K","-0.17%" 29 | "Mar 14, 2018","610.92","689.10","702.41","585.34","205.41K","-11.27%" 30 | "Mar 13, 2018","688.50","696.51","713.99","676.80","132.60K","-1.15%" 31 | "Mar 12, 2018","696.52","719.85","739.84","676.34","123.67K","-3.24%" 32 | "Mar 11, 2018","719.86","679.68","734.20","660.15","139.84K","5.91%" 33 | "Mar 10, 2018","679.68","724.62","745.00","676.27","117.94K","-6.20%" 34 | "Mar 09, 2018","724.61","697.30","727.81","639.04","229.75K","3.92%" 35 | "Mar 08, 2018","697.31","749.20","770.00","688.01","146.74K","-6.93%" 36 | "Mar 07, 2018","749.21","816.48","824.23","725.01","174.36K","-8.22%" 37 | "Mar 06, 2018","816.31","848.14","850.00","803.59","89.00K","-3.71%" 38 | "Mar 05, 2018","847.76","866.06","870.00","847.76","55.13K","-2.11%" 39 | "Mar 04, 2018","866.07","855.29","868.26","835.58","45.12K","1.26%" 40 | "Mar 03, 2018","855.30","854.79","868.70","852.63","40.49K","0.09%" 41 | "Mar 02, 2018","854.50","869.23","879.37","849.73","58.05K","-1.70%" 42 | "Mar 01, 2018","869.24","851.25","881.30","845.61","90.09K","2.11%" 43 | "Feb 28, 2018","851.26","871.20","888.46","850.75","93.98K","-2.31%" 44 | "Feb 27, 2018","871.36","868.60","895.00","862.08","93.51K","0.41%" 45 | "Feb 26, 2018","867.76","838.71","881.60","831.90","136.60K","3.49%" 46 | "Feb 25, 2018","838.47","831.51","848.38","816.13","101.28K","0.84%" 47 | "Feb 24, 2018","831.51","852.68","872.99","808.17","147.41K","-2.50%" 48 | "Feb 23, 2018","852.79","802.85","881.20","787.00","162.83K","6.22%" 49 | "Feb 22, 2018","802.85","837.80","868.94","788.00","180.65K","-4.17%" 50 | "Feb 21, 2018","837.79","884.50","903.33","815.32","220.26K","-5.28%" 51 | "Feb 20, 2018","884.51","939.19","958.99","875.00","150.18K","-5.82%" 52 | "Feb 19, 2018","939.18","913.10","955.84","909.40","118.34K","2.96%" 53 | "Feb 18, 2018","912.21","973.29","979.00","901.00","184.03K","-6.27%" 54 | "Feb 17, 2018","973.28","937.37","973.55","933.52","124.67K","3.83%" 55 | "Feb 16, 2018","937.38","925.02","944.00","907.00","134.07K","1.19%" 56 | "Feb 15, 2018","926.32","919.13","945.00","903.20","205.52K","0.78%" 57 | "Feb 14, 2018","919.11","839.69","922.00","839.69","199.27K","9.46%" 58 | "Feb 13, 2018","839.69","866.40","869.26","821.57","130.39K","-3.08%" 59 | "Feb 12, 2018","866.40","810.64","876.52","810.64","130.22K","6.88%" 60 | "Feb 11, 2018","810.64","851.66","854.50","778.52","146.90K","-4.85%" 61 | "Feb 10, 2018","852.00","878.01","908.99","815.52","165.70K","-3.06%" 62 | "Feb 09, 2018","878.90","814.01","881.69","780.53","182.42K","8.08%" 63 | "Feb 08, 2018","813.20","752.88","845.88","749.88","236.13K","8.25%" 64 | "Feb 07, 2018","751.25","782.99","848.60","716.30","416.98K","-3.88%" 65 | "Feb 06, 2018","781.60","698.62","798.70","566.00","790.23K","11.88%" 66 | "Feb 05, 2018","698.62","827.90","858.00","641.01","547.57K","-15.83%" 67 | "Feb 04, 2018","829.98","972.19","972.69","776.00","340.10K","-14.65%" 68 | "Feb 03, 2018","972.40","923.20","999.00","845.00","211.35K","5.32%" 69 | "Feb 02, 2018","923.30","1,036.20","1,038.70","769.99","520.79K","-10.90%" 70 | "Feb 01, 2018","1,036.30","1,120.70","1,167.00","985.01","285.60K","-7.58%" 71 | "Jan 31, 2018","1,121.30","1,076.80","1,128.70","1,027.80","136.70K","4.21%" 72 | "Jan 30, 2018","1,076.00","1,174.30","1,178.80","1,041.00","246.88K","-8.43%" 73 | "Jan 29, 2018","1,175.00","1,245.50","1,259.80","1,155.90","139.56K","-5.74%" 74 | "Jan 28, 2018","1,246.60","1,114.70","1,264.80","1,109.00","189.36K","11.82%" 75 | "Jan 27, 2018","1,114.80","1,046.90","1,125.30","1,031.60","105.76K","6.48%" 76 | "Jan 26, 2018","1,047.00","1,048.20","1,078.60","983.00","138.71K","-0.11%" 77 | "Jan 25, 2018","1,048.20","1,061.80","1,102.40","1,025.10","162.09K","-1.41%" 78 | "Jan 24, 2018","1,063.20","982.11","1,068.80","952.04","173.18K","8.16%" 79 | "Jan 23, 2018","982.98","995.26","1,022.00","905.38","228.08K","-1.22%" 80 | "Jan 22, 2018","995.08","1,047.00","1,084.10","912.76","238.82K","-4.96%" 81 | "Jan 21, 2018","1,047.00","1,146.30","1,146.30","1,001.50","197.63K","-8.64%" 82 | "Jan 20, 2018","1,146.00","1,032.60","1,160.00","1,029.60","163.86K","10.98%" 83 | "Jan 19, 2018","1,032.60","993.92","1,079.00","960.10","174.91K","3.80%" 84 | "Jan 18, 2018","994.81","1,020.10","1,079.00","940.00","374.07K","-2.23%" 85 | "Jan 17, 2018","1,017.50","1,019.60","1,088.30","770.10","686.58K","-0.25%" 86 | "Jan 16, 2018","1,020.10","1,275.80","1,278.80","868.98","672.02K","-19.89%" 87 | "Jan 15, 2018","1,273.40","1,349.90","1,377.90","1,264.40","137.68K","-5.67%" 88 | "Jan 14, 2018","1,350.00","1,379.90","1,385.00","1,256.00","176.75K","-2.17%" 89 | "Jan 13, 2018","1,380.00","1,257.00","1,423.20","1,252.60","202.78K","9.77%" 90 | "Jan 12, 2018","1,257.20","1,135.10","1,285.00","1,083.40","209.24K","10.72%" 91 | "Jan 11, 2018","1,135.50","1,245.90","1,331.80","1,102.50","360.57K","-9.01%" 92 | "Jan 10, 2018","1,248.00","1,285.70","1,381.90","1,203.20","380.43K","-2.78%" 93 | "Jan 09, 2018","1,283.70","1,129.40","1,299.00","1,119.10","296.90K","13.67%" 94 | "Jan 08, 2018","1,129.30","1,115.90","1,225.00","968.12","439.43K","1.21%" 95 | "Jan 07, 2018","1,115.80","1,004.30","1,116.00","999.50","199.83K","11.10%" 96 | "Jan 06, 2018","1,004.30","962.77","1,014.20","951.38","127.79K","4.31%" 97 | "Jan 05, 2018","962.77","939.30","1,023.60","930.00","298.24K","2.42%" 98 | "Jan 04, 2018","940.00","942.01","997.00","893.24","348.62K","-0.21%" 99 | "Jan 03, 2018","942.01","858.78","954.73","840.00","310.54K","9.69%" 100 | "Jan 02, 2018","858.78","752.46","890.00","752.46","420.96K","14.13%" 101 | "Jan 01, 2018","752.46","736.77","762.00","717.94","121.56K","2.13%" 102 | "Dec 31, 2017","736.77","682.22","741.99","675.56","153.38K","8.00%" 103 | "Dec 30, 2017","682.22","731.52","737.56","640.43","267.70K","-6.74%" 104 | "Dec 29, 2017","731.52","711.42","755.00","703.02","204.82K","2.83%" 105 | "Dec 28, 2017","711.42","736.45","740.30","652.00","255.38K","-3.40%" 106 | "Dec 27, 2017","736.45","749.80","766.06","703.27","167.81K","-1.78%" 107 | "Dec 26, 2017","749.80","709.81","749.80","708.83","149.07K","5.63%" 108 | "Dec 25, 2017","709.81","659.89","737.00","651.76","218.49K","7.56%" 109 | "Dec 24, 2017","659.89","672.59","675.00","560.00","312.62K","-1.89%" 110 | "Dec 23, 2017","672.59","628.19","717.00","616.19","240.69K","7.07%" 111 | "Dec 22, 2017","628.19","786.97","792.00","492.01","780.15K","-20.18%" 112 | "Dec 21, 2017","786.97","794.99","848.08","747.10","341.95K","-1.01%" 113 | "Dec 20, 2017","794.99","799.98","826.20","709.00","423.20K","-0.62%" 114 | "Dec 19, 2017","799.98","783.99","863.00","750.01","518.29K","2.04%" 115 | "Dec 18, 2017","783.99","708.78","798.90","660.00","420.29K","10.61%" 116 | "Dec 17, 2017","708.78","683.25","725.00","683.24","210.62K","3.74%" 117 | "Dec 16, 2017","683.25","678.29","711.96","672.51","200.94K","0.73%" 118 | "Dec 15, 2017","678.29","686.51","698.31","610.00","360.05K","-1.20%" 119 | "Dec 14, 2017","686.51","690.69","760.00","651.00","494.41K","-0.61%" 120 | "Dec 13, 2017","690.69","634.87","742.00","573.00","686.14K","8.79%" 121 | "Dec 12, 2017","634.87","515.25","646.92","497.75","425.21K","23.22%" 122 | "Dec 11, 2017","515.25","429.24","531.20","429.14","224.21K","20.04%" 123 | "Dec 10, 2017","429.24","460.92","460.92","413.30","250.23K","-6.87%" 124 | "Dec 09, 2017","460.92","442.19","487.80","441.00","322.50K","4.24%" 125 | "Dec 08, 2017","442.19","415.02","453.61","400.34","318.98K","6.55%" 126 | "Dec 07, 2017","415.02","413.71","429.00","390.00","322.00K","0.32%" 127 | "Dec 06, 2017","413.71","451.87","454.23","403.00","367.19K","-8.44%" 128 | "Dec 05, 2017","451.87","465.00","467.38","444.17","187.53K","-2.82%" 129 | "Dec 04, 2017","465.00","459.49","471.06","439.27","123.19K","1.20%" 130 | "Dec 03, 2017","459.49","455.51","482.69","431.04","137.97K","0.87%" 131 | "Dec 02, 2017","455.51","460.67","472.00","447.00","135.33K","-1.12%" 132 | "Dec 01, 2017","460.67","432.21","467.00","413.96","169.74K","6.58%" 133 | "Nov 30, 2017","432.21","420.34","454.95","385.40","224.57K","2.82%" 134 | "Nov 29, 2017","420.34","465.56","517.00","403.01","228.93K","-9.71%" 135 | "Nov 28, 2017","465.56","473.44","479.00","457.20","153.81K","-1.66%" 136 | "Nov 27, 2017","473.44","464.00","491.89","458.25","191.77K","2.03%" 137 | "Nov 26, 2017","464.00","464.00","464.00","464.00","-","0.00%" 138 | "Nov 25, 2017","464.00","469.89","481.99","454.40","168.49K","-1.38%" 139 | "Nov 24, 2017","470.51","405.19","478.50","397.37","258.20K","16.12%" 140 | "Nov 23, 2017","405.19","380.48","426.27","374.34","264.29K","6.49%" 141 | "Nov 22, 2017","380.48","360.00","381.89","358.80","138.90K","5.69%" 142 | "Nov 21, 2017","360.00","367.94","373.50","350.00","199.14K","-2.16%" 143 | "Nov 20, 2017","367.94","354.70","373.70","352.03","148.45K","3.73%" 144 | "Nov 19, 2017","354.70","346.68","371.00","343.28","176.58K","2.31%" 145 | "Nov 18, 2017","346.68","331.00","350.40","325.32","148.23K","4.74%" 146 | "Nov 17, 2017","331.00","331.16","335.01","325.00","151.63K","0.07%" 147 | "Nov 16, 2017","330.76","330.59","335.11","321.18","149.13K","0.05%" 148 | "Nov 15, 2017","330.59","334.28","339.61","321.50","167.05K","-1.10%" 149 | "Nov 14, 2017","334.28","313.22","336.69","313.22","244.03K","6.72%" 150 | "Nov 13, 2017","313.22","303.90","318.00","302.40","198.96K","3.07%" 151 | "Nov 12, 2017","303.90","313.07","316.99","293.33","251.26K","-2.93%" 152 | "Nov 11, 2017","313.07","296.18","319.88","294.70","172.77K","5.70%" 153 | "Nov 10, 2017","296.18","319.52","324.03","286.00","331.44K","-7.30%" 154 | "Nov 09, 2017","319.52","307.50","328.80","305.00","251.77K","3.91%" 155 | "Nov 08, 2017","307.50","291.42","318.90","290.11","335.69K","5.52%" 156 | "Nov 07, 2017","291.42","296.90","304.20","285.01","216.51K","-1.85%" 157 | "Nov 06, 2017","296.90","295.63","310.00","292.00","159.37K","0.43%" 158 | "Nov 05, 2017","295.63","299.48","301.00","292.28","98.63K","-1.29%" 159 | "Nov 04, 2017","299.48","303.47","304.38","293.00","132.54K","-1.31%" 160 | "Nov 03, 2017","303.47","284.89","307.36","284.00","217.42K","6.52%" 161 | "Nov 02, 2017","284.89","288.60","293.01","275.21","260.22K","-1.29%" 162 | "Nov 01, 2017","288.60","303.69","305.11","287.04","153.84K","-4.97%" 163 | "Oct 31, 2017","303.69","307.00","312.00","303.10","81.66K","-1.08%" 164 | "Oct 30, 2017","307.00","304.39","314.40","303.93","86.21K","0.86%" 165 | "Oct 29, 2017","304.39","293.49","312.49","290.50","166.62K","3.71%" 166 | "Oct 28, 2017","293.49","295.99","297.01","288.60","70.22K","-0.84%" 167 | "Oct 27, 2017","295.99","295.10","299.50","291.60","68.47K","0.30%" 168 | "Oct 26, 2017","295.10","295.46","299.00","290.55","59.36K","-0.12%" 169 | "Oct 25, 2017","295.46","296.30","300.00","288.50","94.09K","-0.28%" 170 | "Oct 24, 2017","296.30","284.85","311.85","280.02","216.67K","4.02%" 171 | "Oct 23, 2017","284.85","293.55","293.96","273.50","170.70K","-2.96%" 172 | "Oct 22, 2017","293.55","299.23","305.62","289.40","95.45K","-1.90%" 173 | "Oct 21, 2017","299.23","302.61","303.00","289.31","105.32K","-1.12%" 174 | "Oct 20, 2017","302.61","306.97","313.01","301.04","118.80K","-1.42%" 175 | "Oct 19, 2017","306.97","313.45","316.50","304.00","118.04K","-2.07%" 176 | "Oct 18, 2017","313.45","315.65","316.21","287.46","252.92K","-0.70%" 177 | "Oct 17, 2017","315.65","334.46","334.80","308.00","191.86K","-5.62%" 178 | "Oct 16, 2017","334.46","337.23","355.00","330.85","270.07K","-0.82%" 179 | "Oct 15, 2017","337.23","339.24","344.89","315.00","250.08K","-0.59%" 180 | "Oct 14, 2017","339.24","337.46","348.00","334.05","151.02K","0.53%" 181 | "Oct 13, 2017","337.46","303.06","350.00","298.00","383.16K","11.35%" 182 | "Oct 12, 2017","303.06","303.20","310.01","302.10","185.68K","-0.05%" 183 | "Oct 11, 2017","303.20","299.32","306.55","296.60","116.31K","1.30%" 184 | "Oct 10, 2017","299.32","297.40","307.00","292.57","104.64K","0.65%" 185 | "Oct 09, 2017","297.40","309.82","311.16","287.03","180.23K","-4.01%" 186 | "Oct 08, 2017","309.82","311.46","314.39","307.55","103.78K","-0.53%" 187 | "Oct 07, 2017","311.46","308.43","315.00","304.50","117.03K","0.98%" 188 | "Oct 06, 2017","308.43","295.12","309.59","293.04","106.64K","4.51%" 189 | "Oct 05, 2017","295.12","291.40","297.92","285.12","90.80K","1.28%" 190 | "Oct 04, 2017","291.40","291.69","296.00","287.56","112.70K","-0.10%" 191 | "Oct 03, 2017","291.69","296.82","300.50","285.93","129.15K","-1.73%" 192 | "Oct 02, 2017","296.82","304.26","304.63","292.10","133.99K","-2.45%" 193 | "Oct 01, 2017","304.26","303.44","305.57","295.00","110.10K","0.27%" 194 | "Sep 30, 2017","303.44","292.66","307.76","292.30","131.20K","3.68%" 195 | "Sep 29, 2017","292.66","302.63","303.90","280.50","276.12K","-3.29%" 196 | "Sep 28, 2017","302.63","309.75","310.69","297.75","140.29K","-2.30%" 197 | "Sep 27, 2017","309.75","289.28","315.51","286.93","213.82K","7.08%" 198 | "Sep 26, 2017","289.28","295.20","296.38","285.20","104.72K","-2.01%" 199 | "Sep 25, 2017","295.20","282.00","297.93","281.80","186.37K","4.68%" 200 | "Sep 24, 2017","282.00","285.90","294.54","275.41","196.56K","-1.36%" 201 | "Sep 23, 2017","285.90","262.19","287.20","259.01","162.98K","9.04%" 202 | "Sep 22, 2017","262.19","256.67","269.50","253.03","183.77K","2.15%" 203 | "Sep 21, 2017","256.67","283.50","287.53","251.52","292.98K","-9.46%" 204 | "Sep 20, 2017","283.50","282.63","294.00","277.00","146.38K","0.31%" 205 | "Sep 19, 2017","282.63","296.81","299.00","275.00","268.88K","-4.78%" 206 | "Sep 18, 2017","296.81","257.00","299.89","257.00","378.67K","15.49%" 207 | "Sep 17, 2017","257.00","253.00","263.69","239.00","195.92K","1.58%" 208 | "Sep 16, 2017","253.00","258.68","270.00","242.20","308.48K","-2.20%" 209 | "Sep 15, 2017","258.68","222.50","269.00","198.00","954.56K","16.26%" 210 | "Sep 14, 2017","222.50","275.48","281.01","221.71","642.98K","-19.23%" 211 | "Sep 13, 2017","275.48","293.90","294.16","256.00","449.34K","-6.27%" 212 | "Sep 12, 2017","293.90","297.19","316.73","283.00","261.52K","-1.11%" 213 | "Sep 11, 2017","297.19","297.90","308.00","287.33","174.01K","-0.24%" 214 | "Sep 10, 2017","297.90","303.08","305.00","276.11","254.70K","-1.71%" 215 | "Sep 09, 2017","303.08","304.00","307.08","291.46","169.79K","-0.30%" 216 | "Sep 08, 2017","304.00","334.10","334.58","291.00","309.62K","-9.01%" 217 | "Sep 07, 2017","334.10","337.36","338.66","321.10","166.57K","-0.97%" 218 | "Sep 06, 2017","337.36","316.18","339.50","314.81","230.11K","6.70%" 219 | "Sep 05, 2017","316.18","295.81","323.17","267.64","381.67K","6.89%" 220 | "Sep 04, 2017","295.81","350.63","351.59","275.00","569.73K","-15.63%" 221 | "Sep 03, 2017","350.63","345.00","368.40","328.33","212.17K","1.63%" 222 | "Sep 02, 2017","345.00","390.35","390.77","325.10","308.36K","-11.62%" 223 | "Sep 01, 2017","390.35","387.30","395.03","383.60","131.80K","0.79%" 224 | "Aug 31, 2017","387.30","382.78","390.00","380.10","98.59K","1.18%" 225 | "Aug 30, 2017","382.78","372.00","390.10","365.10","188.64K","2.90%" 226 | "Aug 29, 2017","372.00","347.09","375.98","346.42","180.48K","7.18%" 227 | "Aug 28, 2017","347.09","348.01","352.00","332.74","111.21K","-0.26%" 228 | "Aug 27, 2017","348.01","332.72","348.01","331.88","103.44K","4.60%" 229 | "Aug 26, 2017","332.72","328.70","334.60","324.50","90.18K","1.22%" 230 | "Aug 25, 2017","328.70","325.62","338.25","324.04","108.00K","0.95%" 231 | "Aug 24, 2017","325.62","316.50","329.56","314.14","93.42K","2.88%" 232 | "Aug 23, 2017","316.50","312.54","325.00","311.65","115.09K","1.27%" 233 | "Aug 22, 2017","312.54","322.24","329.96","285.01","244.94K","-3.01%" 234 | "Aug 21, 2017","322.24","298.37","346.99","294.53","329.81K","8.00%" 235 | "Aug 20, 2017","298.37","292.78","299.00","286.96","86.96K","1.91%" 236 | "Aug 19, 2017","292.78","292.00","298.51","280.00","158.37K","0.27%" 237 | "Aug 18, 2017","292.00","299.00","307.00","286.00","165.16K","-2.34%" 238 | "Aug 17, 2017","299.00","301.34","312.00","297.01","133.09K","-0.78%" 239 | "Aug 16, 2017","301.34","286.00","304.00","279.94","150.43K","5.36%" 240 | "Aug 15, 2017","286.00","298.22","299.91","272.29","179.77K","-4.10%" 241 | "Aug 14, 2017","298.22","296.64","306.48","293.99","106.08K","0.53%" 242 | "Aug 13, 2017","296.64","307.22","308.00","285.21","166.56K","-3.44%" 243 | "Aug 12, 2017","307.22","308.81","319.78","299.00","160.55K","-0.51%" 244 | "Aug 11, 2017","308.81","295.97","310.42","294.00","130.15K","4.34%" 245 | "Aug 10, 2017","295.97","293.99","310.05","287.60","155.41K","0.67%" 246 | "Aug 09, 2017","293.99","295.83","316.00","277.00","400.20K","-0.62%" 247 | "Aug 08, 2017","295.83","269.51","299.50","265.00","207.56K","9.77%" 248 | "Aug 07, 2017","269.51","264.29","274.60","257.32","146.17K","1.98%" 249 | "Aug 06, 2017","264.29","253.87","271.50","251.00","209.86K","4.10%" 250 | "Aug 05, 2017","253.87","220.73","259.90","219.23","234.87K","15.01%" 251 | "Aug 04, 2017","220.73","224.79","228.30","218.66","83.46K","-1.81%" 252 | "Aug 03, 2017","224.79","218.00","228.20","217.07","96.19K","3.11%" 253 | "Aug 02, 2017","218.00","225.97","229.70","215.00","159.47K","-3.53%" 254 | "Aug 01, 2017","225.97","200.81","232.59","200.80","352.31K","12.53%" -------------------------------------------------------------------------------- /Dataset/BTC Historical Data.csv: -------------------------------------------------------------------------------- 1 | "Date","Price","Open","High","Low","Vol.","Change %" 2 | "Apr 10, 2018","6,839.30","6,770.90","6,890.60","6,650.00","26.15K","1.10%" 3 | "Apr 09, 2018","6,764.60","7,024.00","7,187.40","6,611.00","75.96K","-3.69%" 4 | "Apr 08, 2018","7,023.90","6,892.62","7,114.80","6,883.00","29.33K","1.90%" 5 | "Apr 07, 2018","6,892.60","6,610.00","7,075.40","6,599.90","40.61K","4.27%" 6 | "Apr 06, 2018","6,610.20","6,767.20","6,851.50","6,501.10","42.14K","-2.29%" 7 | "Apr 05, 2018","6,765.00","6,785.80","6,911.00","6,571.90","45.85K","-0.31%" 8 | "Apr 04, 2018","6,785.90","7,403.30","7,422.00","6,670.00","53.72K","-8.37%" 9 | "Apr 03, 2018","7,405.60","7,073.80","7,509.60","7,020.00","49.86K","5.00%" 10 | "Apr 02, 2018","7,052.70","6,813.10","7,121.40","6,770.20","44.01K","3.56%" 11 | "Apr 01, 2018","6,810.00","6,925.40","7,035.10","6,432.40","54.90K","-1.66%" 12 | "Mar 31, 2018","6,925.30","6,838.10","7,221.90","6,782.90","68.02K","1.24%" 13 | "Mar 30, 2018","6,840.40","7,091.50","7,267.30","6,533.00","108.25K","-3.57%" 14 | "Mar 29, 2018","7,094.00","7,936.00","7,963.90","6,897.20","77.41K","-10.61%" 15 | "Mar 28, 2018","7,936.10","7,784.50","8,118.00","7,725.00","35.08K","1.95%" 16 | "Mar 27, 2018","7,784.50","8,128.00","8,209.00","7,727.00","50.41K","-4.12%" 17 | "Mar 26, 2018","8,119.10","8,445.00","8,496.40","7,839.09","56.38K","-3.86%" 18 | "Mar 25, 2018","8,445.10","8,525.00","8,673.90","8,373.00","30.69K","-1.05%" 19 | "Mar 24, 2018","8,535.00","8,911.40","9,040.20","8,463.00","44.21K","-4.19%" 20 | "Mar 23, 2018","8,908.00","8,703.80","8,910.00","8,272.80","44.91K","2.32%" 21 | "Mar 22, 2018","8,706.44","8,888.60","9,088.00","8,453.10","54.42K","-2.18%" 22 | "Mar 21, 2018","8,900.10","8,899.80","9,175.20","8,755.70","42.86K","0.00%" 23 | "Mar 20, 2018","8,899.70","8,600.20","9,025.00","8,309.60","54.28K","3.48%" 24 | "Mar 19, 2018","8,600.10","8,209.00","8,689.90","8,100.00","73.28K","4.88%" 25 | "Mar 18, 2018","8,200.20","7,832.00","8,285.60","7,240.00","88.92K","4.45%" 26 | "Mar 17, 2018","7,851.00","8,250.00","8,350.10","7,729.50","48.97K","-4.85%" 27 | "Mar 16, 2018","8,251.00","8,250.10","8,602.70","7,903.20","56.34K","-0.02%" 28 | "Mar 15, 2018","8,252.90","8,181.30","8,416.70","7,666.30","82.58K","0.81%" 29 | "Mar 14, 2018","8,186.60","9,135.20","9,400.10","7,923.80","78.81K","-10.38%" 30 | "Mar 13, 2018","9,135.00","9,130.20","9,479.00","8,827.70","61.54K","0.15%" 31 | "Mar 12, 2018","9,121.00","9,528.00","9,894.70","8,776.80","67.58K","-4.27%" 32 | "Mar 11, 2018","9,528.00","8,764.40","9,726.10","8,429.00","70.48K","8.74%" 33 | "Mar 10, 2018","8,762.00","9,216.20","9,500.00","8,691.10","52.54K","-4.94%" 34 | "Mar 09, 2018","9,217.00","9,301.90","9,420.50","8,351.00","98.20K","-0.89%" 35 | "Mar 08, 2018","9,300.00","9,910.70","10,109.00","9,037.00","67.75K","-6.09%" 36 | "Mar 07, 2018","9,902.90","10,779.00","10,899.00","9,422.09","75.22K","-7.62%" 37 | "Mar 06, 2018","10,720.00","11,403.00","11,403.00","10,578.00","44.24K","-6.10%" 38 | "Mar 05, 2018","11,416.00","11,497.00","11,696.00","11,390.00","27.56K","-0.74%" 39 | "Mar 04, 2018","11,501.00","11,454.00","11,544.00","11,061.00","28.07K","0.53%" 40 | "Mar 03, 2018","11,440.00","11,024.00","11,526.00","11,024.00","30.65K","3.76%" 41 | "Mar 02, 2018","11,025.00","10,908.00","11,189.00","10,766.00","28.86K","0.92%" 42 | "Mar 01, 2018","10,925.00","10,316.00","11,087.00","10,224.00","33.87K","5.91%" 43 | "Feb 28, 2018","10,315.00","10,583.00","11,063.00","10,270.00","43.89K","-2.40%" 44 | "Feb 27, 2018","10,569.00","10,320.00","10,880.00","10,133.00","39.72K","2.40%" 45 | "Feb 26, 2018","10,321.00","9,583.00","10,437.00","9,359.90","45.94K","7.99%" 46 | "Feb 25, 2018","9,557.40","9,666.30","9,840.00","9,284.30","30.52K","-1.13%" 47 | "Feb 24, 2018","9,666.30","10,144.00","10,499.00","9,350.30","55.70K","-4.72%" 48 | "Feb 23, 2018","10,145.00","9,826.50","10,395.00","9,583.90","59.07K","3.20%" 49 | "Feb 22, 2018","9,830.00","10,453.22","10,912.00","9,740.00","71.23K","-5.98%" 50 | "Feb 21, 2018","10,455.00","11,216.00","11,239.00","10,200.00","76.96K","-6.80%" 51 | "Feb 20, 2018","11,218.00","11,172.00","11,776.00","11,101.00","60.92K","0.40%" 52 | "Feb 19, 2018","11,173.00","10,398.00","11,250.00","10,308.00","50.74K","7.72%" 53 | "Feb 18, 2018","10,372.00","11,062.00","11,250.00","10,122.00","69.83K","-6.17%" 54 | "Feb 17, 2018","11,053.46","10,161.00","11,083.00","10,050.00","52.80K","8.77%" 55 | "Feb 16, 2018","10,162.00","9,996.00","10,270.00","9,674.90","43.89K","1.65%" 56 | "Feb 15, 2018","9,996.90","9,454.30","10,175.00","9,338.80","67.53K","5.73%" 57 | "Feb 14, 2018","9,455.40","8,515.90","9,488.00","8,512.60","50.36K","11.03%" 58 | "Feb 13, 2018","8,515.90","8,902.90","8,952.80","8,339.70","39.51K","-4.32%" 59 | "Feb 12, 2018","8,900.60","8,070.00","9,000.00","8,070.00","51.40K","10.31%" 60 | "Feb 11, 2018","8,069.00","8,563.00","8,569.00","7,851.00","52.21K","-5.77%" 61 | "Feb 10, 2018","8,563.10","8,678.10","9,074.30","8,152.10","68.15K","-1.38%" 62 | "Feb 09, 2018","8,683.20","8,240.00","8,748.00","7,734.70","63.03K","5.44%" 63 | "Feb 08, 2018","8,235.10","7,585.00","8,648.80","7,579.60","77.62K","8.54%" 64 | "Feb 07, 2018","7,587.00","7,679.40","8,488.20","7,175.10","106.70K","-1.13%" 65 | "Feb 06, 2018","7,673.80","6,946.60","7,860.00","6,000.00","192.76K","10.42%" 66 | "Feb 05, 2018","6,949.90","8,185.20","8,378.00","6,658.80","131.29K","-15.25%" 67 | "Feb 04, 2018","8,200.00","9,225.07","9,403.30","7,840.00","74.42K","-11.06%" 68 | "Feb 03, 2018","9,219.40","8,887.10","9,495.00","8,189.60","51.91K","3.64%" 69 | "Feb 02, 2018","8,895.80","9,181.00","9,201.00","7,972.20","123.34K","-3.11%" 70 | "Feb 01, 2018","9,181.10","10,278.00","10,311.00","8,941.00","78.78K","-10.72%" 71 | "Jan 31, 2018","10,284.00","10,170.00","10,411.00","9,761.00","43.23K","1.07%" 72 | "Jan 30, 2018","10,175.00","11,215.00","11,250.00","9,864.90","61.28K","-9.25%" 73 | "Jan 29, 2018","11,212.00","11,836.00","11,957.00","11,074.00","25.65K","-5.30%" 74 | "Jan 28, 2018","11,839.00","11,455.13","12,181.00","11,398.00","29.62K","3.30%" 75 | "Jan 27, 2018","11,461.00","11,068.00","11,683.00","10,822.00","34.40K","3.53%" 76 | "Jan 26, 2018","11,070.00","11,144.00","11,647.00","10,298.00","56.75K","-0.68%" 77 | "Jan 25, 2018","11,146.00","11,402.00","11,723.00","10,857.00","34.44K","-2.35%" 78 | "Jan 24, 2018","11,414.00","10,811.00","11,529.00","10,454.00","43.82K","5.50%" 79 | "Jan 23, 2018","10,819.00","10,770.00","11,383.00","9,901.10","63.85K","0.45%" 80 | "Jan 22, 2018","10,771.00","11,519.00","11,886.00","10,009.00","66.35K","-6.45%" 81 | "Jan 21, 2018","11,514.00","12,732.00","12,732.00","11,020.00","53.62K","-9.54%" 82 | "Jan 20, 2018","12,728.00","11,462.00","13,002.00","11,425.00","46.30K","10.91%" 83 | "Jan 19, 2018","11,476.00","11,036.00","11,879.00","10,649.00","48.55K","3.90%" 84 | "Jan 18, 2018","11,045.00","11,101.00","11,881.00","10,515.00","85.24K","-0.33%" 85 | "Jan 17, 2018","11,082.00","11,059.00","11,490.00","9,231.10","132.23K","0.09%" 86 | "Jan 16, 2018","11,072.00","13,594.00","13,604.00","9,949.40","131.86K","-18.44%" 87 | "Jan 15, 2018","13,575.00","13,558.00","14,350.00","13,307.00","33.46K","0.13%" 88 | "Jan 14, 2018","13,558.00","14,190.00","14,391.00","12,874.34","35.60K","-4.46%" 89 | "Jan 13, 2018","14,191.00","13,794.00","14,580.00","13,760.00","29.01K","2.96%" 90 | "Jan 12, 2018","13,783.00","13,248.00","14,095.00","12,778.00","37.42K","3.90%" 91 | "Jan 11, 2018","13,266.00","14,895.00","14,949.80","12,639.00","71.70K","-10.94%" 92 | "Jan 10, 2018","14,896.00","14,426.00","14,896.00","13,338.00","57.33K","3.28%" 93 | "Jan 09, 2018","14,423.00","14,902.00","15,355.00","14,122.00","43.44K","-3.40%" 94 | "Jan 08, 2018","14,930.00","16,216.00","16,279.00","13,760.00","64.95K","-7.82%" 95 | "Jan 07, 2018","16,196.00","17,163.00","17,176.00","15,726.00","30.84K","-5.62%" 96 | "Jan 06, 2018","17,161.00","16,911.00","17,252.00","16,251.00","29.61K","1.44%" 97 | "Jan 05, 2018","16,917.00","15,159.00","17,101.00","14,769.00","54.63K","11.59%" 98 | "Jan 04, 2018","15,160.00","15,150.00","15,390.00","14,064.00","46.47K","0.03%" 99 | "Jan 03, 2018","15,155.00","14,713.00","15,428.00","14,522.00","38.35K","3.03%" 100 | "Jan 02, 2018","14,709.82","13,448.00","15,300.00","12,810.00","56.18K","10.15%" 101 | "Jan 01, 2018","13,354.00","13,794.00","13,893.00","12,787.00","29.54K","-3.23%" 102 | "Dec 31, 2017","13,800.00","12,385.00","14,140.00","12,183.88","43.29K","11.50%" 103 | "Dec 30, 2017","12,377.00","14,308.00","14,403.00","11,690.00","75.43K","-13.55%" 104 | "Dec 29, 2017","14,317.00","14,323.00","15,105.00","13,847.00","48.01K","0.01%" 105 | "Dec 28, 2017","14,315.00","15,374.00","15,467.00","13,232.00","72.89K","-6.89%" 106 | "Dec 27, 2017","15,374.00","15,680.00","16,494.00","14,463.00","54.99K","-1.95%" 107 | "Dec 26, 2017","15,679.00","13,627.00","16,048.00","13,550.00","63.44K","15.09%" 108 | "Dec 25, 2017","13,623.00","13,517.00","14,278.00","12,678.00","45.61K","1.09%" 109 | "Dec 24, 2017","13,476.00","14,036.00","14,047.00","11,601.18","72.38K","-3.98%" 110 | "Dec 23, 2017","14,035.00","13,173.00","14,986.00","12,755.00","59.92K","6.57%" 111 | "Dec 22, 2017","13,170.00","15,650.00","15,826.00","10,718.00","179.00K","-15.94%" 112 | "Dec 21, 2017","15,666.83","16,433.00","17,333.00","14,827.00","65.58K","-4.62%" 113 | "Dec 20, 2017","16,425.00","17,340.00","17,709.00","15,500.00","82.16K","-5.30%" 114 | "Dec 19, 2017","17,345.00","18,931.00","18,987.00","16,500.00","66.65K","-8.39%" 115 | "Dec 18, 2017","18,934.00","18,959.00","19,171.00","18,010.00","53.58K","-0.20%" 116 | "Dec 17, 2017","18,971.00","19,210.00","19,891.00","18,622.00","51.80K","-1.13%" 117 | "Dec 16, 2017","19,187.00","17,569.55","19,548.00","17,098.00","48.27K","9.50%" 118 | "Dec 15, 2017","17,522.00","16,396.00","18,098.00","16,352.00","63.11K","6.95%" 119 | "Dec 14, 2017","16,383.00","16,122.00","16,999.00","15,870.00","45.72K","1.25%" 120 | "Dec 13, 2017","16,181.00","17,010.00","17,288.00","15,674.00","62.88K","-4.63%" 121 | "Dec 12, 2017","16,967.00","16,754.00","17,500.00","16,234.00","52.09K","1.27%" 122 | "Dec 11, 2017","16,754.00","14,937.00","17,443.00","14,937.00","78.09K","11.72%" 123 | "Dec 10, 2017","14,997.00","14,660.00","15,728.00","12,748.00","107.05K","2.30%" 124 | "Dec 09, 2017","14,660.00","15,829.00","16,300.00","13,021.00","77.82K","-7.62%" 125 | "Dec 08, 2017","15,869.00","16,608.00","17,160.00","13,774.00","124.11K","-4.41%" 126 | "Dec 07, 2017","16,601.00","13,500.00","16,639.00","13,154.00","141.26K","22.72%" 127 | "Dec 06, 2017","13,527.00","11,590.00","13,598.00","11,590.00","83.59K","16.66%" 128 | "Dec 05, 2017","11,595.00","11,611.00","11,949.00","11,414.00","48.94K","0.00%" 129 | "Dec 04, 2017","11,595.00","11,162.00","11,598.00","10,788.00","63.74K","3.93%" 130 | "Dec 03, 2017","11,157.00","10,880.00","11,842.00","10,299.00","93.06K","2.54%" 131 | "Dec 02, 2017","10,881.00","10,852.00","11,187.00","10,627.00","49.71K","0.11%" 132 | "Dec 01, 2017","10,869.00","9,907.00","10,949.00","9,370.10","84.14K","9.71%" 133 | "Nov 30, 2017","9,907.00","9,771.90","10,540.00","8,821.00","129.07K","1.62%" 134 | "Nov 29, 2017","9,749.40","9,891.90","11,427.17","9,001.10","182.74K","-1.50%" 135 | "Nov 28, 2017","9,898.00","9,727.10","9,977.77","9,608.30","47.11K","1.74%" 136 | "Nov 27, 2017","9,728.80","9,303.90","9,760.70","9,268.90","66.66K","4.43%" 137 | "Nov 26, 2017","9,316.00","8,791.00","9,495.00","8,769.20","67.57K","6.27%" 138 | "Nov 25, 2017","8,766.20","8,191.60","8,770.00","8,132.90","44.25K","7.01%" 139 | "Nov 24, 2017","8,191.60","7,977.00","8,350.70","7,873.00","42.85K","2.69%" 140 | "Nov 23, 2017","7,977.10","8,230.00","8,267.60","7,977.10","32.10K","-3.07%" 141 | "Nov 22, 2017","8,230.10","8,097.30","8,310.00","8,064.30","28.86K","1.64%" 142 | "Nov 21, 2017","8,097.30","8,245.10","8,380.00","7,790.00","71.85K","-1.79%" 143 | "Nov 20, 2017","8,245.10","8,052.80","8,310.20","7,943.40","38.28K","2.37%" 144 | "Nov 19, 2017","8,054.20","7,770.60","8,126.90","7,652.00","39.13K","3.61%" 145 | "Nov 18, 2017","7,773.30","7,674.10","7,867.00","7,419.50","40.70K","1.24%" 146 | "Nov 17, 2017","7,677.90","7,865.00","8,029.80","7,511.10","75.95K","-2.37%" 147 | "Nov 16, 2017","7,864.20","7,273.70","8,012.90","7,099.90","85.88K","8.05%" 148 | "Nov 15, 2017","7,278.30","6,589.90","7,310.20","6,589.90","71.61K","10.63%" 149 | "Nov 14, 2017","6,579.20","6,476.50","6,687.80","6,315.40","49.52K","1.62%" 150 | "Nov 13, 2017","6,474.60","5,806.50","6,680.00","5,786.10","110.44K","11.21%" 151 | "Nov 12, 2017","5,822.10","6,282.40","6,465.00","5,426.00","172.69K","-7.60%" 152 | "Nov 11, 2017","6,300.70","6,541.20","6,788.00","6,166.00","72.84K","-3.69%" 153 | "Nov 10, 2017","6,542.20","7,123.30","7,313.10","6,405.20","88.43K","-8.20%" 154 | "Nov 09, 2017","7,126.20","7,447.00","7,447.00","7,017.60","50.14K","-4.25%" 155 | "Nov 08, 2017","7,442.40","7,102.00","7,895.00","7,029.90","97.30K","4.77%" 156 | "Nov 07, 2017","7,103.30","6,959.60","7,214.40","6,959.00","37.54K","2.13%" 157 | "Nov 06, 2017","6,955.00","7,355.10","7,429.50","6,915.10","63.27K","-5.78%" 158 | "Nov 05, 2017","7,382.00","7,370.90","7,595.00","7,272.00","46.29K","0.18%" 159 | "Nov 04, 2017","7,369.00","7,104.00","7,521.10","6,936.50","48.62K","1.24%" 160 | "Nov 03, 2017","7,278.40","7,018.90","7,447.50","6,926.50","64.15K","3.68%" 161 | "Nov 02, 2017","7,019.90","6,735.00","7,315.10","6,724.50","97.45K","4.35%" 162 | "Nov 01, 2017","6,727.30","6,450.20","6,727.30","6,348.00","57.13K","4.17%" 163 | "Oct 31, 2017","6,458.30","6,129.90","6,472.10","6,082.70","38.76K","5.44%" 164 | "Oct 30, 2017","6,125.30","6,146.00","6,237.20","6,010.00","33.26K","-0.50%" 165 | "Oct 29, 2017","6,156.00","5,718.10","6,330.00","5,662.90","61.92K","7.61%" 166 | "Oct 28, 2017","5,720.60","5,759.80","5,863.90","5,634.70","26.66K","-0.68%" 167 | "Oct 27, 2017","5,759.60","5,890.00","6,010.20","5,681.20","39.71K","-2.21%" 168 | "Oct 26, 2017","5,890.00","5,724.20","5,966.60","5,680.50","42.72K","2.97%" 169 | "Oct 25, 2017","5,720.00","5,509.90","5,743.90","5,367.90","44.80K","3.82%" 170 | "Oct 24, 2017","5,509.50","5,902.50","5,902.50","5,457.50","64.03K","-6.73%" 171 | "Oct 23, 2017","5,906.90","5,980.50","6,051.00","5,639.80","67.06K","-1.23%" 172 | "Oct 22, 2017","5,980.50","6,005.10","6,069.60","5,717.90","50.58K","-0.41%" 173 | "Oct 21, 2017","6,005.10","5,984.90","6,190.00","5,873.60","53.52K","0.34%" 174 | "Oct 20, 2017","5,984.50","5,694.00","6,082.20","5,606.40","61.78K","5.10%" 175 | "Oct 19, 2017","5,694.00","5,574.80","5,741.00","5,505.80","38.04K","2.32%" 176 | "Oct 18, 2017","5,565.00","5,597.70","5,597.90","5,114.30","69.04K","-0.57%" 177 | "Oct 17, 2017","5,597.10","5,764.80","5,779.00","5,511.00","31.91K","-2.90%" 178 | "Oct 16, 2017","5,764.40","5,712.20","5,803.20","5,570.40","31.41K","1.15%" 179 | "Oct 15, 2017","5,698.60","5,838.70","5,876.90","5,450.00","57.34K","-2.34%" 180 | "Oct 14, 2017","5,835.00","5,636.80","5,854.30","5,567.30","36.81K","3.52%" 181 | "Oct 13, 2017","5,636.80","5,440.00","5,874.30","5,376.00","99.15K","3.84%" 182 | "Oct 12, 2017","5,428.50","4,824.90","5,437.60","4,815.10","79.26K","12.51%" 183 | "Oct 11, 2017","4,824.90","4,777.70","4,879.50","4,715.00","28.92K","1.00%" 184 | "Oct 10, 2017","4,777.00","4,782.30","4,940.00","4,717.50","42.68K","-0.11%" 185 | "Oct 09, 2017","4,782.30","4,612.40","4,874.90","4,551.30","48.93K","3.67%" 186 | "Oct 08, 2017","4,613.10","4,435.90","4,630.00","4,417.60","29.86K","3.99%" 187 | "Oct 07, 2017","4,436.00","4,370.00","4,477.10","4,316.10","17.41K","1.49%" 188 | "Oct 06, 2017","4,371.00","4,312.60","4,424.50","4,294.00","25.94K","1.29%" 189 | "Oct 05, 2017","4,315.40","4,215.90","4,364.60","4,134.90","25.36K","2.38%" 190 | "Oct 04, 2017","4,215.10","4,310.60","4,353.80","4,177.70","26.37K","-2.23%" 191 | "Oct 03, 2017","4,311.10","4,399.30","4,439.90","4,222.00","28.54K","-2.02%" 192 | "Oct 02, 2017","4,400.10","4,404.30","4,482.00","4,359.80","29.08K","-0.10%" 193 | "Oct 01, 2017","4,404.30","4,366.60","4,420.50","4,257.70","29.23K","0.85%" 194 | "Sep 30, 2017","4,367.00","4,168.10","4,393.40","4,160.10","31.50K","4.73%" 195 | "Sep 29, 2017","4,169.90","4,190.00","4,244.60","4,024.70","38.94K","-0.48%" 196 | "Sep 28, 2017","4,190.00","4,207.50","4,268.60","4,125.00","36.57K","-0.37%" 197 | "Sep 27, 2017","4,205.40","3,881.60","4,226.50","3,878.10","48.62K","8.41%" 198 | "Sep 26, 2017","3,879.10","3,930.00","3,983.00","3,850.90","21.41K","-1.30%" 199 | "Sep 25, 2017","3,930.00","3,654.70","3,977.00","3,654.70","40.15K","7.59%" 200 | "Sep 24, 2017","3,652.80","3,779.60","3,781.30","3,620.00","20.88K","-3.35%" 201 | "Sep 23, 2017","3,779.60","3,598.70","3,808.00","3,559.10","25.64K","5.03%" 202 | "Sep 22, 2017","3,598.50","3,597.30","3,743.60","3,493.50","49.24K","-0.14%" 203 | "Sep 21, 2017","3,603.40","3,875.50","3,903.70","3,564.40","56.98K","-6.97%" 204 | "Sep 20, 2017","3,873.20","3,892.20","4,048.00","3,834.10","33.21K","-0.69%" 205 | "Sep 19, 2017","3,900.00","4,084.40","4,110.00","3,836.20","47.77K","-4.51%" 206 | "Sep 18, 2017","4,084.10","3,667.00","4,113.90","3,667.00","58.98K","11.40%" 207 | "Sep 17, 2017","3,666.30","3,680.10","3,775.90","3,476.30","37.05K","-0.52%" 208 | "Sep 16, 2017","3,685.40","3,697.10","3,874.00","3,511.10","70.74K","-0.34%" 209 | "Sep 15, 2017","3,698.00","3,237.40","3,809.00","2,981.00","183.11K","14.20%" 210 | "Sep 14, 2017","3,238.10","3,850.20","3,917.20","3,206.20","127.51K","-15.89%" 211 | "Sep 13, 2017","3,849.70","4,149.40","4,159.60","3,734.00","71.51K","-7.08%" 212 | "Sep 12, 2017","4,142.90","4,198.90","4,378.40","4,055.50","40.04K","-1.43%" 213 | "Sep 11, 2017","4,203.00","4,234.90","4,373.10","4,123.00","30.90K","-0.69%" 214 | "Sep 10, 2017","4,232.10","4,315.40","4,325.00","3,975.80","45.87K","-1.99%" 215 | "Sep 09, 2017","4,317.90","4,304.00","4,381.20","4,159.40","31.11K","0.28%" 216 | "Sep 08, 2017","4,305.80","4,613.50","4,686.20","4,107.10","60.93K","-6.67%" 217 | "Sep 07, 2017","4,613.50","4,594.60","4,672.80","4,465.30","23.13K","0.53%" 218 | "Sep 06, 2017","4,589.10","4,375.00","4,631.40","4,361.40","39.00K","4.90%" 219 | "Sep 05, 2017","4,374.90","4,210.60","4,469.90","3,900.10","57.73K","4.15%" 220 | "Sep 04, 2017","4,200.40","4,599.20","4,606.00","4,056.50","59.08K","-8.59%" 221 | "Sep 03, 2017","4,595.00","4,534.20","4,699.80","4,331.00","33.56K","1.34%" 222 | "Sep 02, 2017","4,534.40","4,911.80","4,969.00","4,400.50","55.03K","-7.55%" 223 | "Sep 01, 2017","4,904.90","4,718.30","4,927.40","4,660.70","28.71K","3.96%" 224 | "Aug 31, 2017","4,718.20","4,567.90","4,749.90","4,567.90","18.47K","3.27%" 225 | "Aug 30, 2017","4,569.00","4,586.60","4,641.10","4,481.10","17.07K","-0.39%" 226 | "Aug 29, 2017","4,587.10","4,385.10","4,644.20","4,336.70","32.70K","4.64%" 227 | "Aug 28, 2017","4,383.80","4,330.70","4,395.20","4,175.70","21.22K","1.20%" 228 | "Aug 27, 2017","4,331.80","4,340.20","4,405.70","4,305.00","11.16K","-0.23%" 229 | "Aug 26, 2017","4,341.70","4,351.50","4,364.00","4,243.60","14.80K","-0.23%" 230 | "Aug 25, 2017","4,351.50","4,324.10","4,461.20","4,277.40","27.76K","0.61%" 231 | "Aug 24, 2017","4,325.20","4,135.00","4,370.80","4,093.00","22.04K","4.75%" 232 | "Aug 23, 2017","4,129.10","4,086.90","4,248.60","4,055.90","27.49K","1.35%" 233 | "Aug 22, 2017","4,074.00","3,998.90","4,140.00","3,600.00","61.72K","1.79%" 234 | "Aug 21, 2017","4,002.50","4,066.30","4,093.50","3,956.40","26.61K","-1.52%" 235 | "Aug 20, 2017","4,064.30","4,145.00","4,192.00","4,040.90","25.10K","-1.95%" 236 | "Aug 19, 2017","4,145.10","4,088.20","4,184.10","3,920.00","41.77K","1.34%" 237 | "Aug 18, 2017","4,090.20","4,269.70","4,359.00","3,957.00","46.80K","-3.99%" 238 | "Aug 17, 2017","4,260.00","4,386.40","4,489.10","4,178.10","40.30K","-2.88%" 239 | "Aug 16, 2017","4,386.30","4,160.00","4,403.60","3,928.10","35.29K","5.65%" 240 | "Aug 15, 2017","4,151.90","4,321.00","4,430.00","3,841.90","64.13K","-3.88%" 241 | "Aug 14, 2017","4,319.50","4,061.60","4,330.30","3,969.30","34.22K","6.57%" 242 | "Aug 13, 2017","4,053.30","3,866.20","4,183.70","3,836.10","48.16K","4.86%" 243 | "Aug 12, 2017","3,865.50","3,643.40","3,965.40","3,590.00","37.66K","6.08%" 244 | "Aug 11, 2017","3,644.10","3,404.70","3,690.60","3,380.00","26.43K","6.93%" 245 | "Aug 10, 2017","3,407.90","3,340.20","3,444.40","3,310.00","19.13K","2.04%" 246 | "Aug 09, 2017","3,339.90","3,415.00","3,424.40","3,236.80","26.25K","-2.20%" 247 | "Aug 08, 2017","3,415.00","3,395.00","3,482.90","3,343.80","31.72K","0.54%" 248 | "Aug 07, 2017","3,396.70","3,232.50","3,440.00","3,190.00","24.54K","5.23%" 249 | "Aug 06, 2017","3,227.90","3,255.00","3,309.80","3,156.00","16.95K","-0.88%" 250 | "Aug 05, 2017","3,256.40","2,860.00","3,331.90","2,855.00","50.56K","13.86%" 251 | "Aug 04, 2017","2,860.00","2,790.30","2,874.80","2,762.60","18.99K","2.50%" 252 | "Aug 03, 2017","2,790.30","2,702.00","2,813.00","2,698.00","16.86K","3.27%" 253 | "Aug 02, 2017","2,702.00","2,733.80","2,757.80","2,640.00","23.76K","-1.07%" 254 | "Aug 01, 2017","2,731.20","2,854.30","2,901.60","2,615.80","42.31K","-4.37%" -------------------------------------------------------------------------------- /Dataset/Bitcoin.csv: -------------------------------------------------------------------------------- 1 | "Name","Symbol","Date","High","Low","Open","Close","market_billion_usd","volume_billion_usd" 2 | "Bitcoin","BTC",2021-07-07,29600.6269503,28803.58501355,28994.00891641,29374.15188907,546.001594837512,40.7303013586402 3 | "Bitcoin","BTC",2021-07-08,33155.11881942,29091.18119088,29376.45583414,32127.26793922,597.20594466885,67.8654207654564 4 | "Bitcoin","BTC",2021-07-09,34608.55673797,32052.31707551,32129.4073556,32782.02446581,609.409213147033,78.6652352018428 5 | "Bitcoin","BTC",2021-07-10,33440.21856853,28722.75527058,32810.94764381,31971.91352155,594.384025390855,81.1634753441808 6 | "Bitcoin","BTC",2021-07-11,34437.5905918,30221.1867389,31977.04113228,33992.42934365,631.980005969628,67.5473247816809 7 | "Bitcoin","BTC",2021-07-12,36879.69856854,33514.03374162,34013.614533,36824.36441009,684.67124632365,75.2894338105909 8 | "Bitcoin","BTC",2021-07-13,40180.3679073,36491.18981083,36833.87435728,39371.04235311,732.062681138135,84.7621410314945 9 | "Bitcoin","BTC",2021-07-14,41946.73935079,36838.63599637,39381.76584266,40797.61071993,758.625941266752,88.1075194795047 10 | "Bitcoin","BTC",2021-07-15,41436.35000639,38980.87690625,40788.64052286,40254.54649816,748.563483043138,61.9841628370747 11 | "Bitcoin","BTC",2021-07-16,41420.19103255,35984.62712175,40254.21779758,38356.43950662,713.304617760949,79.9807476903546 12 | "Bitcoin","BTC",2021-07-17,38346.52950301,30549.59876946,38346.52950301,35566.65594049,661.457321418052,123.320567398623 13 | "Bitcoin","BTC",2021-07-18,36568.52697414,32697.97662163,35516.36114084,33922.9605815,630.920422745048,74.7732779094566 14 | "Bitcoin","BTC",2021-07-19,37599.96059774,32584.66767186,33915.11958124,37316.35939997,694.069582193756,69.3643159792799 15 | "Bitcoin","BTC",2021-07-20,39966.40524241,36868.5632453,37325.10763475,39187.32812109,728.904366964361,63.6159900330102 16 | "Bitcoin","BTC",2021-07-21,39577.71118833,34659.58974449,39156.7080858,36825.36585131,685.005864471362,67.7607578807239 17 | "Bitcoin","BTC",2021-07-22,37864.36887891,35633.55401669,36821.64873201,36178.13890106,673.000645230822,57.7061878751045 18 | "Bitcoin","BTC",2021-07-23,36722.34987621,34069.32218533,36163.64923243,35791.27792129,665.831621390986,52.3598543362119 19 | "Bitcoin","BTC",2021-07-24,37299.28580604,34883.84404829,35792.23666766,36630.07568284,681.470030572075,49.5117024293542 20 | "Bitcoin","BTC",2021-07-25,37755.89185872,36069.80639361,36642.23272357,36069.80639361,671.081200699871,57.2441954855007 21 | "Bitcoin","BTC",2021-07-26,36378.32670045,33570.47780293,36050.11269824,35547.7508855,661.400102161156,66.8345731612987 22 | "Bitcoin","BTC",2021-07-27,35552.67949732,30250.74963896,35549.39740902,30825.69850603,573.565664943002,75.6430676877441 23 | "Bitcoin","BTC",2021-07-28,33811.85156014,28953.372751,30817.62519242,33005.76356216,614.160521491552,77.2072725111301 24 | "Bitcoin","BTC",2021-07-29,33360.97818593,31493.15966789,32985.75691326,32067.64288212,596.733137645063,48.3547379752892 25 | "Bitcoin","BTC",2021-07-30,32944.00894195,31106.68577002,32064.37631516,32289.37808687,600.888568009501,48.6438305993616 26 | "Bitcoin","BTC",2021-07-31,34802.74297839,32087.78796567,32285.79891345,32366.39304887,602.350097075439,59.8970548379431 27 | "Bitcoin","BTC",2021-08-01,32794.5495902,31030.26596571,32358.6131737,32569.84955679,606.169260386978,60.2554214704068 28 | "Bitcoin","BTC",2021-08-02,32564.03024112,29367.13921776,32564.03024112,30432.54707881,566.417413553967,62.576762015466 29 | "Bitcoin","BTC",2021-08-03,33858.31099229,30023.2068317,30441.0418168,33466.09635821,622.91007381962,76.51715770632 30 | "Bitcoin","BTC",2021-08-04,38406.26096472,32064.81418675,34318.6716924,34316.38765032,638.76867136187,117.89457251068 31 | "Bitcoin","BTC",2021-08-05,34834.70830094,32940.18691419,34295.9350435,34269.52154165,637.92457328379,65.14182879826 32 | "Bitcoin","BTC",2021-08-06,34288.33147504,32270.17602471,34270.87759214,33114.35774753,616.45274453329,52.75454267138 33 | "Bitcoin","BTC",2021-08-07,34638.21348502,32384.22810648,33114.57724298,33537.1768196,624.34904440912,61.40040066027 34 | "Bitcoin","BTC",2021-08-08,35896.88214463,33489.21867158,33533.20067102,35510.28903716,661.11458166376,63.08858543312 35 | "Bitcoin","BTC",2021-08-09,37480.18789413,35443.98272623,35510.82121346,37472.09010368,697.67291048843,61.16681815883 36 | "Bitcoin","BTC",2021-08-10,38592.17637724,36317.49880728,37475.10402915,36926.06446515,687.54275252324,68.83807439161 37 | "Bitcoin","BTC",2021-08-11,38225.90594551,36658.76353663,36931.54564785,38144.30686267,710.2667525338,58.59806640224 38 | "Bitcoin","BTC",2021-08-12,40846.54690329,38138.38833975,38138.38833975,39266.01073494,731.19249009284,71.32603365298 39 | "Bitcoin","BTC",2021-08-13,39621.8354917,37446.15388489,39250.1905137,38903.44147971,724.47883321111,65.50064114312 40 | "Bitcoin","BTC",2021-08-14,46203.93143652,38076.32280719,38886.82728995,46196.46371944,860.3427062597,101.46722268667 41 | "Bitcoin","BTC",2021-08-15,48003.72396182,45166.96004492,46184.99146609,46481.10423596,865.68295661892,91.80984688569 42 | "Bitcoin","BTC",2021-08-16,47145.56819859,43881.1525986,46469.76120204,44918.18449192,836.61690752653,87.30108989644 43 | "Bitcoin","BTC",2021-08-17,48463.46712511,44187.7623505,44898.71161149,47909.33119483,892.36485613599,81.38891180985 44 | "Bitcoin","BTC",2021-08-18,48745.73380014,46424.97781781,47877.03437451,47504.85118326,884.87405061184,76.55504119579 45 | "Bitcoin","BTC",2021-08-19,48047.74459107,46392.28233345,47491.20255503,47105.51747252,877.47889446366,70.25045615505 46 | "Bitcoin","BTC",2021-08-20,49487.64087275,47114.50958649,47114.50958649,48717.2902111,907.55133015322,71.24867522822 47 | "Bitcoin","BTC",2021-08-21,48875.57161074,46347.47709171,48696.53665993,47945.05683234,893.21008003898,77.06990316639 48 | "Bitcoin","BTC",2021-08-22,50341.10325246,47201.30375472,47944.45800728,49199.87134362,916.62341825364,77.04958288551 49 | "Bitcoin","BTC",2021-08-23,52533.91431173,49072.3771403,49207.27643233,52149.00753587,971.61162645428,80.82054540432 50 | "Bitcoin","BTC",2021-08-24,52474.10724863,51015.76455379,52140.97271656,51679.79669449,962.91507802448,52.05472357867 51 | "Bitcoin","BTC",2021-08-25,56113.65054685,50937.27572157,51675.98128513,55888.13368221,1041.38069666948,63.49549691785 52 | "Bitcoin","BTC",2021-08-26,57505.22818745,54626.5597762,55887.33571358,56099.52051348,1045.37108764023,68.14546002592 53 | "Bitcoin","BTC",2021-08-27,58330.57214185,55672.60951328,56068.56824551,57539.9436679,1072.26329472494,51.89758519058 54 | "Bitcoin","BTC",2021-08-28,57533.38932549,48967.56518819,57532.73886407,54207.31906543,1010.20521298129,92.05242033157 55 | "Bitcoin","BTC",2021-08-29,54204.92975578,45290.59026818,54204.92975578,48824.42686909,909.92585446021,106.10249282411 56 | "Bitcoin","BTC",2021-08-30,51290.13669492,47213.49816173,48835.08766112,49705.33331637,926.39309075051,63.69552138834 57 | "Bitcoin","BTC",2021-08-31,51948.96698227,47093.85301914,49709.08242476,47093.85301914,877.76612613833,54.50656594911 58 | "Bitcoin","BTC",2021-09-01,48370.78525976,44454.84211387,47180.4640539,46339.76008289,863.75227505308,350.96794147906 59 | "Bitcoin","BTC",2021-09-02,48253.27010115,45269.0257658,46344.77223734,46188.45127539,860.97813542144,45.9109463818 60 | "Bitcoin","BTC",2021-09-03,46716.43099302,43241.61822653,46194.01635186,45137.77046805,841.42897751457,53.44388745079 61 | "Bitcoin","BTC",2021-09-04,49784.01528954,45115.09311478,45159.50305253,49631.24137077,925.23552788227,53.89130011216 62 | "Bitcoin","BTC",2021-09-05,50127.50988383,47228.84534569,49612.10703748,48378.98805435,901.93368326916,47.53089772012 63 | "Bitcoin","BTC",2021-09-06,52535.1357839,48274.32049678,48415.8149783,50538.24341445,942.23657690451,53.22081197456 64 | "Bitcoin","BTC",2021-09-07,51735.09105293,47656.92904603,50522.30503036,48561.1661539,905.41410480724,52.34381667973 65 | "Bitcoin","BTC",2021-09-08,49396.43086209,46542.51494044,48527.03198074,48927.3045548,912.28506572002,48.62592888343 66 | "Bitcoin","BTC",2021-09-09,49147.21821972,47257.5269076,48899.23078213,48912.38173056,912.0541660285,34.36356466053 67 | "Bitcoin","BTC",2021-09-10,51384.36601025,48918.6802649,48918.6802649,51206.69295308,954.88095458464,43.13745937773 68 | "Bitcoin","BTC",2021-09-11,52314.06880137,49506.05345768,51174.1169466,52246.52230995,974.32188362325,48.59742804817 69 | "Bitcoin","BTC",2021-09-12,54824.11781138,51981.83131223,52272.96978194,54824.11781138,1022.43997286218,50.91222738488 70 | "Bitcoin","BTC",2021-09-13,57258.25497592,53290.89116852,54824.01119917,56008.54940114,1044.5800574774,57.29557761375 71 | "Bitcoin","BTC",2021-09-14,58091.0627026,54484.59308946,55963.18008858,57805.12301924,1078.13560411797,56.77234359484 72 | "Bitcoin","BTC",2021-09-15,57996.61948977,55376.6500885,57821.21874746,57332.08896391,1069.36632184362,55.68994470229 73 | "Bitcoin","BTC",2021-09-16,61683.86401412,56217.97238151,57343.37024739,61243.08476552,1142.36915866694,60.66982981423 74 | "Bitcoin","BTC",2021-09-17,61597.91839583,59302.31697742,61221.13429704,59302.31697742,1106.22613252459,43.90122556385 75 | "Bitcoin","BTC",2021-09-18,60540.99271158,55393.16536281,59267.4290492,55907.20022619,1042.94602485964,66.41936988968 76 | "Bitcoin","BTC",2021-09-19,56833.17978025,53555.02773503,55840.78651437,56804.90123161,1059.74581842303,59.74979859867 77 | "Bitcoin","BTC",2021-09-20,58969.81634559,54528.62716687,56825.82889756,58870.89333325,1098.33765532654,60.25831319117 78 | "Bitcoin","BTC",2021-09-21,60116.24964434,54253.58000473,58893.078058,57858.92070527,1079.51108688433,55.74604100038 79 | "Bitcoin","BTC",2021-09-22,59498.37646021,56643.70148588,57850.44063985,58346.65297359,1088.66645074646,49.0638737855 80 | "Bitcoin","BTC",2021-09-23,60031.2869743,58213.29736375,58332.26220538,58313.64260857,1088.10522197752,50.36173122171 81 | "Bitcoin","BTC",2021-09-24,58767.89678899,56005.61700987,58309.91303265,57523.42098673,1073.41723540843,51.94341453937 82 | "Bitcoin","BTC",2021-09-25,58471.47864713,54288.1580282,57517.89148833,54529.14561107,1017.59526911706,56.52145497429 83 | "Bitcoin","BTC",2021-09-26,55985.44014058,53470.6933802,54511.66203198,54738.94493032,1021.56347968218,56.43502391375 84 | "Bitcoin","BTC",2021-09-27,57262.38293272,52514.33339864,54710.48908407,52774.26369049,984.94814289789,70.56722378651 85 | "Bitcoin","BTC",2021-09-28,53392.38600133,50856.5686854,52726.7455686,51704.1619252,965.0287626657,67.99981284102 86 | "Bitcoin","BTC",2021-09-29,55137.31372578,51579.85505711,51683.0100897,55137.31372578,1029.15069741115,56.65219797751 87 | "Bitcoin","BTC",2021-09-30,56568.2160496,54242.90967619,55137.56723702,55973.51084173,1044.8141474116,47.26654223337 88 | "Bitcoin","BTC",2021-10-01,56610.31196825,55071.11199378,55974.94118696,55950.7457745,1044.44655905906,47.68658091799 89 | "Bitcoin","BTC",2021-10-02,58342.09641112,55139.34175909,55947.8989665,57750.19987147,1078.08829647671,57.62558702704 90 | "Bitcoin","BTC",2021-10-03,59447.22403098,57251.5506051,57750.13284273,58917.6930451,1099.93989080441,54.41411643202 91 | "Bitcoin","BTC",2021-10-04,59930.02716002,57726.41877444,58930.27778393,58918.83271375,1100.01678676256,65.52082622539 92 | "Bitcoin","BTC",2021-10-05,59586.0722493,58505.27905354,58926.56414734,59095.80797806,1103.3778307583,61.66916379239 93 | "Bitcoin","BTC",2021-10-06,60267.18765009,58869.27996831,59098.87907036,59384.3133586,1108.81386308286,58.72786062012 94 | "Bitcoin","BTC",2021-10-07,60110.26846076,57603.88917376,59397.40846193,57603.88917376,1075.61726118033,59.64134448362 95 | "Bitcoin","BTC",2021-10-08,58913.74779189,57168.67578229,57604.83861776,58758.55629127,1097.23266034816,50.7496629697 96 | "Bitcoin","BTC",2021-10-09,59891.2969082,57694.82602134,58760.87326121,59057.87896588,1102.88079008918,60.70627211462 97 | "Bitcoin","BTC",2021-10-10,59479.57855171,57646.80889002,59171.93202224,58192.35868406,1086.76918329456,66.05802798788 98 | "Bitcoin","BTC",2021-10-11,58731.14290107,55604.02359245,58186.50853398,56048.93781271,1046.79305475258,75.64530358361 99 | "Bitcoin","BTC",2021-10-12,58338.73822544,55879.08419515,56099.91311078,58323.95357975,1089.33432813876,53.05385564135 100 | "Bitcoin","BTC",2021-10-13,58937.04651601,57807.86384217,58326.56361984,58245.00300108,1087.9110578698,46.65520854571 101 | "Bitcoin","BTC",2021-10-14,61276.66536564,58038.70627787,58253.77680886,59793.23541009,1116.88980287223,58.23847052526 102 | "Bitcoin","BTC",2021-10-15,60790.55531507,59289.79563078,59846.23078558,60204.96491379,1124.63584877545,46.28025258042 103 | "Bitcoin","BTC",2021-10-16,61253.0369158,59589.87375623,60175.94475711,59893.45188869,1118.8710720689,51.82868851948 104 | "Bitcoin","BTC",2021-10-17,63742.28333718,59869.95629306,59890.01779033,63503.45793019,1186.36404414027,69.98345436184 105 | "Bitcoin","BTC",2021-10-18,64863.0989077,61554.79669042,63523.75486927,63109.69593464,1179.06109398042,77.45177968704 106 | "Bitcoin","BTC",2021-10-19,63821.67219266,62208.96436559,63075.19622093,63314.01084504,1182.94549274441,60.95438157931 107 | "Bitcoin","BTC",2021-10-20,63594.72091303,60222.53207871,63258.50517438,61572.78960116,1150.45715673961,84.29300746797 108 | "Bitcoin","BTC",2021-10-21,62572.17605057,60361.35217909,61529.92099734,60683.82123331,1133.88247923677,66.13875919801 109 | "Bitcoin","BTC",2021-10-22,61057.45650886,52829.53592647,60701.88609331,56216.18500243,1050.44540160972,97.46887275837 110 | "Bitcoin","BTC",2021-10-23,57520.05477733,54368.59365509,56191.5841095,55724.26709807,1041.28767215373,65.34486515877 111 | "Bitcoin","BTC",2021-10-24,57062.1502465,53448.04838457,55681.79251074,56473.0322808,1055.32352651409,67.8493239552 112 | "Bitcoin","BTC",2021-10-25,56757.97158884,53695.4703347,56471.12771923,53906.08804584,1007.38953436043,54.92661246571 113 | "Bitcoin","BTC",2021-10-26,55410.22866494,50583.81405608,53857.10689483,51762.27205146,967.37247237528,74.7986307775 114 | "Bitcoin","BTC",2021-10-27,52120.79164545,47714.66215249,51739.80692966,51093.65070999,954.91923009193,86.66866732038 115 | "Bitcoin","BTC",2021-10-28,51167.56335742,48805.2846976,51143.22627463,50050.86821565,935.47164821336,49.01449478062 116 | "Bitcoin","BTC",2021-10-29,50506.01909839,47159.48584083,50052.83164893,49004.25326318,915.95594325631,46.1171142401 117 | "Bitcoin","BTC",2021-10-30,54288.00215537,48852.79684295,49077.79236302,54021.75478737,1009.78004266105,58.28403982462 118 | "Bitcoin","BTC",2021-10-31,55416.96405761,53319.18665411,54030.30371848,55033.11801332,1028.73335959248,49.44822275659 119 | "Bitcoin","BTC",2021-11-01,56227.20564809,53887.91781682,55036.63741947,54824.70489507,1024.88820873436,48.00057295478 120 | "Bitcoin","BTC",2021-11-02,55115.84415438,52418.02844504,54858.09149222,53555.10849133,1001.19363407178,46.08892977974 121 | "Bitcoin","BTC",2021-11-03,57900.71998842,53129.6008774,53568.66358369,57750.17734563,1079.6698843197,52.39593198468 122 | "Bitcoin","BTC",2021-11-04,58448.33881062,57052.2741756,57714.66485835,57828.05063222,1081.17451534254,42.83642735973 123 | "Bitcoin","BTC",2021-11-05,57902.59217082,56141.90651506,57825.86281955,56631.07741255,1058.86200505749,38.17740533516 124 | "Bitcoin","BTC",2021-11-06,58973.30843091,56590.86914497,56620.27262011,57200.29122289,1069.56393545309,51.71313903103 125 | "Bitcoin","BTC",2021-11-07,57214.17876121,53191.42503284,57214.17876121,53333.53775274,997.32414259309,68.56470696726 126 | "Bitcoin","BTC",2021-11-08,57911.36359718,52969.05536281,53252.16476125,57424.00594813,1073.87301286668,69.24131674683 127 | "Bitcoin","BTC",2021-11-09,58363.3146181,55382.50610418,57441.30708417,56396.51416376,1054.71491867496,69.52328510578 128 | "Bitcoin","BTC",2021-11-10,58606.63396719,55321.84671038,56413.95355125,57356.40187692,1072.72743521046,68.43402337624 129 | "Bitcoin","BTC",2021-11-11,59464.61249257,56975.21065264,57352.7659529,58803.77580865,1099.86394100424,65.38298063381 130 | "Bitcoin","BTC",2021-11-12,59210.88178942,56482.00354511,58877.3886984,58232.3161419,1089.24455767556,65.9066903473 131 | "Bitcoin","BTC",2021-11-13,59519.35442559,54071.45537889,58250.87253094,55859.79754454,1044.9273378175,71.7765462983 132 | "Bitcoin","BTC",2021-11-14,56872.54492059,54608.65245902,55847.24104211,56704.5730585,1060.79087719162,61.30839632532 133 | "Bitcoin","BTC",2021-11-15,57939.36241484,49150.53387514,56714.53316738,49150.53387514,919.52784794971,75.21540390665 134 | "Bitcoin","BTC",2021-11-16,51330.84358607,46980.01875184,49735.43206467,49716.19160254,930.1610100601,96.72115292569 135 | "Bitcoin","BTC",2021-11-17,51438.11908462,48868.57828576,49682.9818555,49880.53342038,933.27690126497,55.73749745261 136 | "Bitcoin","BTC",2021-11-18,50639.66532796,46664.141871,49855.49465011,46760.18656071,874.93101974208,59.16104747443 137 | "Bitcoin","BTC",2021-11-19,49720.04462248,43963.35018635,46716.63798759,46456.05847448,869.27907650207,64.047871555 138 | "Bitcoin","BTC",2021-11-20,46623.55822816,42207.28810587,46415.89925412,43537.51138918,814.70164650905,74.90363844984 139 | "Bitcoin","BTC",2021-11-21,45812.45840792,42367.83145309,43488.05798819,42909.40092517,802.97434686295,56.18736508394 140 | "Bitcoin","BTC",2021-11-22,43546.1164845,30681.49691178,42944.97544731,37002.4404659,692.45257014678,126.35809874669 141 | "Bitcoin","BTC",2021-11-23,42462.98498552,35050.61582451,36753.66970802,40782.73826245,763.19592902193,88.28194335863 142 | "Bitcoin","BTC",2021-11-24,42172.17361572,33616.45388421,40596.94832252,37304.69067136,698.10878981673,82.05161686113 143 | "Bitcoin","BTC",2021-11-25,38831.05443914,35383.68375136,37371.02990629,37536.63111241,702.44925364834,57.37727324044 144 | "Bitcoin","BTC",2021-11-26,38289.21812026,31227.33943257,37531.4484526,34770.58362292,650.68627074428,78.46927436073 145 | "Bitcoin","BTC",2021-11-27,39835.13982978,34551.08054976,34700.363568,38705.97863723,724.33207242359,67.35958409836 146 | "Bitcoin","BTC",2021-11-28,39776.34979796,36581.42891576,38795.7802497,38402.22385137,718.82937740847,56.21191580314 147 | "Bitcoin","BTC",2021-11-29,40782.07818311,37905.8348536,38392.62365582,39294.19738214,735.55641116613,51.34673516035 148 | "Bitcoin","BTC",2021-11-30,40379.61767161,37247.90367644,39316.88967818,38436.96853505,719.53812912779,43.21096872058 149 | "Bitcoin","BTC",2021-12-01,38856.96788502,34779.0394272,38507.08307537,35697.60639024,668.28393006656,55.20019195177 150 | "Bitcoin","BTC",2021-12-02,37234.49847965,33693.92945797,35684.1568817,34616.06800347,648.06101320776,45.2310133346 151 | "Bitcoin","BTC",2021-12-03,36400.66888165,33520.73795924,34607.40597914,35678.12920411,667.97663839815,31.64608092132 152 | "Bitcoin","BTC",2021-12-04,37468.24899082,34241.94356094,35658.59295707,37332.85368874,698.99048618497,39.00984763928 153 | "Bitcoin","BTC",2021-12-05,37896.73619262,35787.08596532,37293.79237447,36684.92451667,686.89102122493,34.63942329736 154 | "Bitcoin","BTC",2021-12-06,38231.3391761,35966.30715642,36699.92291982,37575.17957566,703.59967142541,33.07086718976 155 | "Bitcoin","BTC",2021-12-07,39478.95118167,37243.97372784,37599.40994043,39208.76599489,734.22433223942,35.46075042701 156 | "Bitcoin","BTC",2021-12-08,39242.48626197,35717.72230304,39242.48626197,36894.40532994,690.9150720928,41.83109018661 157 | "Bitcoin","BTC",2021-12-09,37917.71414924,34900.41223702,36880.15597053,35551.95872588,665.8046398328,35.95947339907 158 | "Bitcoin","BTC",2021-12-10,36436.42096405,35304.58007817,35538.60872998,35862.37772747,671.65255785514,28.91344058492 159 | "Bitcoin","BTC",2021-12-11,36790.57215572,33480.64124099,35835.26550975,33560.70783776,628.57296175853,33.68393666324 160 | "Bitcoin","BTC",2021-12-12,34017.38797859,31114.44247046,33589.52085635,33472.63174808,626.95494487853,49.90205044189 161 | "Bitcoin","BTC",2021-12-13,37537.37115028,32475.86603066,33416.97785088,37345.12148619,699.51613869797,53.97291900762 162 | "Bitcoin","BTC",2021-12-14,38334.32544308,35847.5936407,37389.51565087,36702.59937466,687.50942122628,43.57603285366 163 | "Bitcoin","BTC",2021-12-15,37608.69429327,36044.44991066,36697.03129279,37334.39952553,699.36872983832,38.69973698532 164 | "Bitcoin","BTC",2021-12-16,37408.92559512,34728.19010076,37340.14284419,35552.51714847,666.01817375346,37.92422855001 165 | "Bitcoin","BTC",2021-12-17,39322.78021188,34864.10993969,35555.79014042,39097.86089667,732.46565989178,40.66911283787 166 | "Bitcoin","BTC",2021-12-18,40978.36447697,38757.28412199,39016.9701778,40218.47785943,753.47106253364,43.14891467317 167 | "Bitcoin","BTC",2021-12-19,41295.26857449,39609.4691963,40427.16992116,40406.26898673,757.02987472496,46.42014918533 168 | "Bitcoin","BTC",2021-12-20,40516.77682766,38176.03417592,40168.69037027,38347.06322666,718.49477361153,39.21163509963 169 | "Bitcoin","BTC",2021-12-21,39513.67016412,37439.67410798,38341.42380252,38053.50417253,713.02563175751,37.09667004676 170 | "Bitcoin","BTC",2021-12-22,38187.26016042,35255.85491821,38099.47705463,35787.24478177,670.58944485086,36.20088727495 171 | "Bitcoin","BTC",2021-12-23,36457.79628009,34933.06225074,35854.52922288,35615.86927002,667.40085926087,31.2072797185 172 | "Bitcoin","BTC",2021-12-24,36059.48351685,33432.07604413,35563.13941499,35698.29644336,668.96886876975,36.66403405441 173 | "Bitcoin","BTC",2021-12-25,35721.63963385,31295.93552923,35641.14606474,31676.69373254,593.62757588655,52.80903859379 174 | "Bitcoin","BTC",2021-12-26,33292.45476399,28893.62165844,31622.37708528,32505.6598245,609.18063938988,58.9643530583 175 | "Bitcoin","BTC",2021-12-27,34753.40850285,31772.63235532,32515.71430319,33723.0289781,632.01127843638,46.31710892469 176 | "Bitcoin","BTC",2021-12-28,35228.85261084,32385.21469567,33682.80040376,34662.43589358,649.64399744137,33.12336811618 177 | "Bitcoin","BTC",2021-12-29,35487.2480035,31350.88385819,34659.10449948,31637.78005541,592.97821118903,40.230904226 178 | "Bitcoin","BTC",2021-12-30,32637.58719331,30184.50179358,31594.66357132,32186.27767093,603.27602830872,38.58538552138 179 | "Bitcoin","BTC",2021-12-31,34656.12735553,32071.75714808,32287.52321108,34649.64458753,649.46167701412,35.51164089397 180 | "Bitcoin","BTC",2022-01-01,35219.89179129,33902.0758922,34679.12222205,34434.33531428,645.44275949321,33.89252375203 181 | "Bitcoin","BTC",2022-01-02,36542.11101765,34252.48489199,34475.55969665,35867.77773549,672.33342340187,37.9014600443 182 | "Bitcoin","BTC",2022-01-03,36074.75975718,34086.15187806,35908.38805414,35040.83724889,656.85251323754,34.05903609904 183 | "Bitcoin","BTC",2022-01-04,35035.98271227,32883.78122635,35035.98271227,33572.11765253,629.33932529774,37.83895707915 184 | "Bitcoin","BTC",2022-01-05,33939.58869924,32770.68078046,33549.6001774,33897.04858963,635.45078410609,38.72897494225 185 | "Bitcoin","BTC",2022-01-06,34909.25989883,33402.69653615,33854.42136155,34668.54840182,649.93970134623,24.38395864326 186 | "Bitcoin","BTC",2022-01-07,35937.56714724,34396.47745754,34665.56486608,35287.77976616,661.57483631486,24.92430791111 187 | "Bitcoin","BTC",2022-01-08,35284.34443007,33213.66103397,35284.34443007,33746.00245614,632.6962071997,26.72155428207 188 | "Bitcoin","BTC",2022-01-09,35038.53636342,33599.91616924,33723.50965515,34235.19345116,641.89916159376,26.50125986976 189 | -------------------------------------------------------------------------------- /Dataset/historical_pricing.csv: -------------------------------------------------------------------------------- 1 | Coin,XRP,XRP,XRP,XRP,XRP,XRP,BTC,BTC,BTC,BTC,BTC,BTC,ETH,ETH,ETH,ETH,ETH,ETH 2 | ,Change %,High,Low,Open,Price,Vol.,Change %,High,Low,Open,Price,Vol.,Change %,High,Low,Open,Price,Vol. 3 | Date,,,,,,,,,,,,,,,,,, 4 | 8/1/17,9.57%,0.185,0.1585,0.163,0.1786,26.82M,-4.37%,2901.6,2615.8,2854.3,2731.2,42.31K,12.53%,232.59,200.8,200.81,225.97,352.31K 5 | 8/2/17,-4.59%,0.18,0.168,0.1786,0.1704,11.47M,-1.07%,2757.8,2640,2733.8,2702,23.76K,-3.53%,229.7,215,225.97,218,159.47K 6 | 8/3/17,2.46%,0.1772,0.1688,0.1704,0.1746,4.59M,3.27%,2813,2698,2702,2790.3,16.86K,3.11%,228.2,217.07,218,224.79,96.19K 7 | 8/4/17,-0.57%,0.178,0.171,0.1746,0.1736,7.21M,2.50%,2874.8,2762.6,2790.3,2860,18.99K,-1.81%,228.3,218.66,224.79,220.73,83.46K 8 | 8/5/17,5.99%,0.192,0.171,0.1736,0.184,20.38M,13.86%,3331.9,2855,2860,3256.4,50.56K,15.01%,259.9,219.23,220.73,253.87,234.87K 9 | 8/6/17,-2.01%,0.1898,0.1765,0.184,0.1803,12.15M,-0.88%,3309.8,3156,3255,3227.9,16.95K,4.10%,271.5,251,253.87,264.29,209.86K 10 | 8/7/17,-0.72%,0.183,0.1763,0.1803,0.179,10.48M,5.23%,3440,3190,3232.5,3396.7,24.54K,1.98%,274.6,257.32,264.29,269.51,146.17K 11 | 8/8/17,9.44%,0.2,0.1768,0.179,0.1959,31.91M,0.54%,3482.9,3343.8,3395,3415,31.72K,9.77%,299.5,265,269.51,295.83,207.56K 12 | 8/9/17,-6.38%,0.1959,0.18,0.1959,0.1834,13.38M,-2.20%,3424.4,3236.8,3415,3339.9,26.25K,-0.62%,316,277,295.83,293.99,400.20K 13 | 8/10/17,-1.42%,0.185,0.177,0.1834,0.1808,11.26M,2.04%,3444.4,3310,3340.2,3407.9,19.13K,0.67%,310.05,287.6,293.99,295.97,155.41K 14 | 8/11/17,-1.83%,0.1834,0.1753,0.1808,0.1775,10.87M,6.93%,3690.6,3380,3404.7,3644.1,26.43K,4.34%,310.42,294,295.97,308.81,130.15K 15 | 8/12/17,-3.15%,0.1828,0.1704,0.1775,0.1719,13.18M,6.08%,3965.4,3590,3643.4,3865.5,37.66K,-0.51%,319.78,299,308.81,307.22,160.55K 16 | 8/13/17,-3.37%,0.1719,0.1585,0.1719,0.1661,20.08M,4.86%,4183.7,3836.1,3866.2,4053.3,48.16K,-3.44%,308,285.21,307.22,296.64,166.56K 17 | 8/14/17,0.96%,0.1801,0.165,0.1661,0.1677,10.23M,6.57%,4330.3,3969.3,4061.6,4319.5,34.22K,0.53%,306.48,293.99,296.64,298.22,106.08K 18 | 8/15/17,-5.78%,0.1677,0.1521,0.1677,0.158,18.86M,-3.88%,4430,3841.9,4321,4151.9,64.13K,-4.10%,299.91,272.29,298.22,286,179.77K 19 | 8/16/17,1.77%,0.1608,0.1486,0.158,0.1608,16.04M,5.65%,4403.6,3928.1,4160,4386.3,35.29K,5.36%,304,279.94,286,301.34,150.43K 20 | 8/17/17,-1.74%,0.161,0.153,0.1608,0.158,11.83M,-2.88%,4489.1,4178.1,4386.4,4260,40.30K,-0.78%,312,297.01,301.34,299,133.09K 21 | 8/18/17,-0.63%,0.17,0.151,0.158,0.157,19.65M,-3.99%,4359,3957,4269.7,4090.2,46.80K,-2.34%,307,286,299,292,165.16K 22 | 8/19/17,-2.87%,0.162,0.148,0.157,0.1525,14.31M,1.34%,4184.1,3920,4088.2,4145.1,41.77K,0.27%,298.51,280,292,292.78,158.37K 23 | 8/20/17,4.33%,0.1617,0.1493,0.1525,0.1591,12.01M,-1.95%,4192,4040.9,4145,4064.3,25.10K,1.91%,299,286.96,292.78,298.37,86.96K 24 | 8/21/17,22.56%,0.2065,0.1511,0.1591,0.195,54.92M,-1.52%,4093.5,3956.4,4066.3,4002.5,26.61K,8.00%,346.99,294.53,298.37,322.24,329.81K 25 | 8/22/17,24.10%,0.259,0.1711,0.195,0.242,91.20M,1.79%,4140,3600,3998.9,4074,61.72K,-3.01%,329.96,285.01,322.24,312.54,244.94K 26 | 8/23/17,1.65%,0.2995,0.2155,0.242,0.246,102.07M,1.35%,4248.6,4055.9,4086.9,4129.1,27.49K,1.27%,325,311.65,312.54,316.5,115.09K 27 | 8/24/17,-11.75%,0.2869,0.21,0.246,0.2171,74.21M,4.75%,4370.8,4093,4135,4325.2,22.04K,2.88%,329.56,314.14,316.5,325.62,93.42K 28 | 8/25/17,-0.55%,0.231,0.2027,0.2171,0.2159,36.12M,0.61%,4461.2,4277.4,4324.1,4351.5,27.76K,0.95%,338.25,324.04,325.62,328.7,108.00K 29 | 8/26/17,-2.96%,0.231,0.206,0.2159,0.2095,16.76M,-0.23%,4364,4243.6,4351.5,4341.7,14.80K,1.22%,334.6,324.5,328.7,332.72,90.18K 30 | 8/27/17,-3.77%,0.2103,0.1925,0.2095,0.2016,20.64M,-0.23%,4405.7,4305,4340.2,4331.8,11.16K,4.60%,348.01,331.88,332.72,348.01,103.44K 31 | 8/28/17,11.76%,0.2461,0.1941,0.2016,0.2253,53.16M,1.20%,4395.2,4175.7,4330.7,4383.8,21.22K,-0.26%,352,332.74,348.01,347.09,111.21K 32 | 8/29/17,-2.57%,0.226,0.212,0.2253,0.2195,23.63M,4.64%,4644.2,4336.7,4385.1,4587.1,32.70K,7.18%,375.98,346.42,347.09,372,180.48K 33 | 8/30/17,5.51%,0.2331,0.2167,0.2195,0.2316,15.15M,-0.39%,4641.1,4481.1,4586.6,4569,17.07K,2.90%,390.1,365.1,372,382.78,188.64K 34 | 8/31/17,11.74%,0.265,0.2272,0.2316,0.2588,28.80M,3.27%,4749.9,4567.9,4567.9,4718.2,18.47K,1.18%,390,380.1,382.78,387.3,98.59K 35 | 9/1/17,-1.97%,0.26,0.2434,0.2588,0.2537,28.62M,3.96%,4927.4,4660.7,4718.3,4904.9,28.71K,0.79%,395.03,383.6,387.3,390.35,131.80K 36 | 9/2/17,-11.90%,0.2538,0.2135,0.2537,0.2235,40.90M,-7.55%,4969,4400.5,4911.8,4534.4,55.03K,-11.62%,390.77,325.1,390.35,345,308.36K 37 | 9/3/17,2.91%,0.2382,0.215,0.2235,0.23,19.11M,1.34%,4699.8,4331,4534.2,4595,33.56K,1.63%,368.4,328.33,345,350.63,212.17K 38 | 9/4/17,-11.96%,0.2304,0.185,0.23,0.2025,36.81M,-8.59%,4606,4056.5,4599.2,4200.4,59.08K,-15.63%,351.59,275,350.63,295.81,569.73K 39 | 9/5/17,6.17%,0.22,0.1881,0.2025,0.215,27.24M,4.15%,4469.9,3900.1,4210.6,4374.9,57.73K,6.89%,323.17,267.64,295.81,316.18,381.67K 40 | 9/6/17,7.44%,0.2328,0.2139,0.215,0.231,19.74M,4.90%,4631.4,4361.4,4375,4589.1,39.00K,6.70%,339.5,314.81,316.18,337.36,230.11K 41 | 9/7/17,-1.95%,0.2317,0.2197,0.231,0.2265,12.49M,0.53%,4672.8,4465.3,4594.6,4613.5,23.13K,-0.97%,338.66,321.1,337.36,334.1,166.57K 42 | 9/8/17,-6.53%,0.229,0.1965,0.2265,0.2117,21.63M,-6.67%,4686.2,4107.1,4613.5,4305.8,60.93K,-9.01%,334.58,291,334.1,304,309.62K 43 | 9/9/17,0.33%,0.2144,0.2067,0.2117,0.2124,8.70M,0.28%,4381.2,4159.4,4304,4317.9,31.11K,-0.30%,307.08,291.46,304,303.08,169.79K 44 | 9/10/17,1.79%,0.224,0.1975,0.2124,0.2162,16.61M,-1.99%,4325,3975.8,4315.4,4232.1,45.87K,-1.71%,305,276.11,303.08,297.9,254.70K 45 | 9/11/17,-1.06%,0.2215,0.2086,0.2162,0.2139,15.09M,-0.69%,4373.1,4123,4234.9,4203,30.90K,-0.24%,308,287.33,297.9,297.19,174.01K 46 | 9/12/17,-2.10%,0.2245,0.2052,0.2139,0.2094,17.51M,-1.43%,4378.4,4055.5,4198.9,4142.9,40.04K,-1.11%,316.73,283,297.19,293.9,261.52K 47 | 9/13/17,-5.44%,0.2099,0.1902,0.2094,0.198,14.95M,-7.08%,4159.6,3734,4149.4,3849.7,71.51K,-6.27%,294.16,256,293.9,275.48,449.34K 48 | 9/14/17,-13.74%,0.2,0.166,0.198,0.1708,30.05M,-15.89%,3917.2,3206.2,3850.2,3238.1,127.51K,-19.23%,281.01,221.71,275.48,222.5,642.98K 49 | 9/15/17,7.85%,0.1924,0.1455,0.1708,0.1842,42.23M,14.20%,3809,2981,3237.4,3698,183.11K,16.26%,269,198,222.5,258.68,954.56K 50 | 9/16/17,-1.19%,0.1919,0.1729,0.1842,0.182,15.12M,-0.34%,3874,3511.1,3697.1,3685.4,70.74K,-2.20%,270,242.2,258.68,253,308.48K 51 | 9/17/17,-0.44%,0.184,0.1711,0.182,0.1812,7.17M,-0.52%,3775.9,3476.3,3680.1,3666.3,37.05K,1.58%,263.69,239,253,257,195.92K 52 | 9/18/17,6.62%,0.1943,0.1808,0.1812,0.1932,17.22M,11.40%,4113.9,3667,3667,4084.1,58.98K,15.49%,299.89,257,257,296.81,378.67K 53 | 9/19/17,-4.45%,0.1943,0.182,0.1932,0.1846,9.35M,-4.51%,4110,3836.2,4084.4,3900,47.77K,-4.78%,299,275,296.81,282.63,268.88K 54 | 9/20/17,-1.63%,0.1884,0.1805,0.1846,0.1816,5.38M,-0.69%,4048,3834.1,3892.2,3873.2,33.21K,0.31%,294,277,282.63,283.5,146.38K 55 | 9/21/17,-5.84%,0.1835,0.1686,0.1816,0.171,7.18M,-6.97%,3903.7,3564.4,3875.5,3603.4,56.98K,-9.46%,287.53,251.52,283.5,256.67,292.98K 56 | 9/22/17,1.11%,0.1771,0.166,0.171,0.1729,4.85M,-0.14%,3743.6,3493.5,3597.3,3598.5,49.24K,2.15%,269.5,253.03,256.67,262.19,183.77K 57 | 9/23/17,3.70%,0.1804,0.1699,0.1729,0.1793,11.86M,5.03%,3808,3559.1,3598.7,3779.6,25.64K,9.04%,287.2,259.01,262.19,285.9,162.98K 58 | 9/24/17,-2.45%,0.18,0.1726,0.1793,0.1749,3.93M,-3.35%,3781.3,3620,3779.6,3652.8,20.88K,-1.36%,294.54,275.41,285.9,282,196.56K 59 | 9/25/17,5.09%,0.1869,0.1745,0.1749,0.1838,6.87M,7.59%,3977,3654.7,3654.7,3930,40.15K,4.68%,297.93,281.8,282,295.2,186.37K 60 | 9/26/17,2.77%,0.1943,0.181,0.1838,0.1889,9.69M,-1.30%,3983,3850.9,3930,3879.1,21.41K,-2.01%,296.38,285.2,295.2,289.28,104.72K 61 | 9/27/17,11.22%,0.2156,0.1877,0.1889,0.2101,21.35M,8.41%,4226.5,3878.1,3881.6,4205.4,48.62K,7.08%,315.51,286.93,289.28,309.75,213.82K 62 | 9/28/17,-3.76%,0.2109,0.1965,0.2101,0.2022,15.34M,-0.37%,4268.6,4125,4207.5,4190,36.57K,-2.30%,310.69,297.75,309.75,302.63,140.29K 63 | 9/29/17,-2.57%,0.2022,0.1879,0.2022,0.197,11.89M,-0.48%,4244.6,4024.7,4190,4169.9,38.94K,-3.29%,303.9,280.5,302.63,292.66,276.12K 64 | 9/30/17,1.02%,0.2065,0.195,0.197,0.199,6.45M,4.73%,4393.4,4160.1,4168.1,4367,31.50K,3.68%,307.76,292.3,292.66,303.44,131.20K 65 | 10/1/17,4.97%,0.2089,0.1964,0.199,0.2089,3.97M,0.85%,4420.5,4257.7,4366.6,4404.3,29.23K,0.27%,305.57,295,303.44,304.26,110.10K 66 | 10/2/17,-2.68%,0.2099,0.2,0.2089,0.2033,5.52M,-0.10%,4482,4359.8,4404.3,4400.1,29.08K,-2.45%,304.63,292.1,304.26,296.82,133.99K 67 | 10/3/17,-0.15%,0.2062,0.1975,0.2033,0.203,6.05M,-2.02%,4439.9,4222,4399.3,4311.1,28.54K,-1.73%,300.5,285.93,296.82,291.69,129.15K 68 | 10/4/17,5.81%,0.2173,0.2011,0.203,0.2148,10.07M,-2.23%,4353.8,4177.7,4310.6,4215.1,26.37K,-0.10%,296,287.56,291.69,291.4,112.70K 69 | 10/5/17,10.38%,0.2445,0.2133,0.2148,0.2371,23.41M,2.38%,4364.6,4134.9,4215.9,4315.4,25.36K,1.28%,297.92,285.12,291.4,295.12,90.80K 70 | 10/6/17,-1.69%,0.2446,0.232,0.2371,0.2331,12.72M,1.29%,4424.5,4294,4312.6,4371,25.94K,4.51%,309.59,293.04,295.12,308.43,106.64K 71 | 10/7/17,3.17%,0.2417,0.2325,0.2331,0.2405,6.69M,1.49%,4477.1,4316.1,4370,4436,17.41K,0.98%,315,304.5,308.43,311.46,117.03K 72 | 10/8/17,16.84%,0.2813,0.2389,0.2405,0.281,23.30M,3.99%,4630,4417.6,4435.9,4613.1,29.86K,-0.53%,314.39,307.55,311.46,309.82,103.78K 73 | 10/9/17,-10.85%,0.281,0.233,0.281,0.2505,33.49M,3.67%,4874.9,4551.3,4612.4,4782.3,48.93K,-4.01%,311.16,287.03,309.82,297.4,180.23K 74 | 10/10/17,3.11%,0.2669,0.2405,0.2505,0.2583,13.65M,-0.11%,4940,4717.5,4782.3,4777,42.68K,0.65%,307,292.57,297.4,299.32,104.64K 75 | 10/11/17,1.55%,0.2658,0.256,0.2583,0.2623,6.13M,1.00%,4879.5,4715,4777.7,4824.9,28.92K,1.30%,306.55,296.6,299.32,303.2,116.31K 76 | 10/12/17,-6.40%,0.265,0.2455,0.2623,0.2455,20.98M,12.51%,5437.6,4815.1,4824.9,5428.5,79.26K,-0.05%,310.01,302.1,303.2,303.06,185.68K 77 | 10/13/17,6.03%,0.27,0.2325,0.2455,0.2603,30.59M,3.84%,5874.3,5376,5440,5636.8,99.15K,11.35%,350,298,303.06,337.46,383.16K 78 | 10/14/17,-1.81%,0.2688,0.2544,0.2603,0.2556,15.54M,3.52%,5854.3,5567.3,5636.8,5835,36.81K,0.53%,348,334.05,337.46,339.24,151.02K 79 | 10/15/17,4.07%,0.27,0.249,0.2556,0.266,13.94M,-2.34%,5876.9,5450,5838.7,5698.6,57.34K,-0.59%,344.89,315,339.24,337.23,250.08K 80 | 10/16/17,-3.08%,0.3,0.2523,0.266,0.2578,49.71M,1.15%,5803.2,5570.4,5712.2,5764.4,31.41K,-0.82%,355,330.85,337.23,334.46,270.07K 81 | 10/17/17,-10.86%,0.2665,0.2188,0.2578,0.2298,35.85M,-2.90%,5779,5511,5764.8,5597.1,31.91K,-5.62%,334.8,308,334.46,315.65,191.86K 82 | 10/18/17,-5.70%,0.2349,0.2025,0.2298,0.2167,30.98M,-0.57%,5597.9,5114.3,5597.7,5565,69.04K,-0.70%,316.21,287.46,315.65,313.45,252.92K 83 | 10/19/17,-1.11%,0.2329,0.206,0.2167,0.2143,18.69M,2.32%,5741,5505.8,5574.8,5694,38.04K,-2.07%,316.5,304,313.45,306.97,118.04K 84 | 10/20/17,-2.57%,0.224,0.2052,0.2143,0.2088,16.28M,5.10%,6082.2,5606.4,5694,5984.5,61.78K,-1.42%,313.01,301.04,306.97,302.61,118.80K 85 | 10/21/17,0.53%,0.2106,0.1967,0.2088,0.2099,13.91M,0.34%,6190,5873.6,5984.9,6005.1,53.52K,-1.12%,303,289.31,302.61,299.23,105.32K 86 | 10/22/17,-4.57%,0.212,0.195,0.2099,0.2003,11.40M,-0.41%,6069.6,5717.9,6005.1,5980.5,50.58K,-1.90%,305.62,289.4,299.23,293.55,95.45K 87 | 10/23/17,-4.29%,0.2017,0.185,0.2003,0.1917,11.65M,-1.23%,6051,5639.8,5980.5,5906.9,67.06K,-2.96%,293.96,273.5,293.55,284.85,170.70K 88 | 10/24/17,6.00%,0.2168,0.183,0.1917,0.2032,20.37M,-6.73%,5902.5,5457.5,5902.5,5509.5,64.03K,4.02%,311.85,280.02,284.85,296.3,216.67K 89 | 10/25/17,-0.89%,0.2056,0.196,0.2032,0.2014,6.62M,3.82%,5743.9,5367.9,5509.9,5720,44.80K,-0.28%,300,288.5,296.3,295.46,94.09K 90 | 10/26/17,0.30%,0.2051,0.1995,0.2014,0.202,6.18M,2.97%,5966.6,5680.5,5724.2,5890,42.72K,-0.12%,299,290.55,295.46,295.1,59.36K 91 | 10/27/17,-1.24%,0.2032,0.1975,0.202,0.1995,3.44M,-2.21%,6010.2,5681.2,5890,5759.6,39.71K,0.30%,299.5,291.6,295.1,295.99,68.47K 92 | 10/28/17,-0.80%,0.201,0.1971,0.1995,0.1979,4.03M,-0.68%,5863.9,5634.7,5759.8,5720.6,26.66K,-0.84%,297.01,288.6,295.99,293.49,70.22K 93 | 10/29/17,1.67%,0.2045,0.196,0.1979,0.2012,5.47M,7.61%,6330,5662.9,5718.1,6156,61.92K,3.71%,312.49,290.5,293.49,304.39,166.62K 94 | 10/30/17,0.40%,0.2042,0.2,0.2012,0.202,3.99M,-0.50%,6237.2,6010,6146,6125.3,33.26K,0.86%,314.4,303.93,304.39,307,86.21K 95 | 10/31/17,-1.98%,0.204,0.1971,0.202,0.198,5.44M,5.44%,6472.1,6082.7,6129.9,6458.3,38.76K,-1.08%,312,303.1,307,303.69,81.66K 96 | 11/1/17,-3.48%,0.201,0.1894,0.198,0.1911,9.15M,4.17%,6727.3,6348,6450.2,6727.3,57.13K,-4.97%,305.11,287.04,303.69,288.6,153.84K 97 | 11/2/17,4.66%,0.207,0.175,0.1911,0.2,17.22M,4.35%,7315.1,6724.5,6735,7019.9,97.45K,-1.29%,293.01,275.21,288.6,284.89,260.22K 98 | 11/3/17,2.50%,0.2295,0.1956,0.2,0.205,24.89M,3.68%,7447.5,6926.5,7018.9,7278.4,64.15K,6.52%,307.36,284,284.89,303.47,217.42K 99 | 11/4/17,-1.56%,0.2056,0.1991,0.205,0.2018,6.33M,1.24%,7521.1,6936.5,7104,7369,48.62K,-1.31%,304.38,293,303.47,299.48,132.54K 100 | 11/5/17,-1.14%,0.204,0.1975,0.2018,0.1995,5.07M,0.18%,7595,7272,7370.9,7382,46.29K,-1.29%,301,292.28,299.48,295.63,98.63K 101 | 11/6/17,0.80%,0.2069,0.1981,0.1995,0.2011,5.94M,-5.78%,7429.5,6915.1,7355.1,6955,63.27K,0.43%,310,292,295.63,296.9,159.37K 102 | 11/7/17,2.29%,0.2061,0.1992,0.2011,0.2057,8.28M,2.13%,7214.4,6959,6959.6,7103.3,37.54K,-1.85%,304.2,285.01,296.9,291.42,216.51K 103 | 11/8/17,5.06%,0.225,0.203,0.2057,0.2161,17.10M,4.77%,7895,7029.9,7102,7442.4,97.30K,5.52%,318.9,290.11,291.42,307.5,335.69K 104 | 11/9/17,-1.71%,0.223,0.2121,0.2161,0.2124,14.21M,-4.25%,7447,7017.6,7447,7126.2,50.14K,3.91%,328.8,305,307.5,319.52,251.77K 105 | 11/10/17,-4.43%,0.2185,0.198,0.2124,0.203,19.88M,-8.20%,7313.1,6405.2,7123.3,6542.2,88.43K,-7.30%,324.03,286,319.52,296.18,331.44K 106 | 11/11/17,3.05%,0.2147,0.2,0.203,0.2092,16.52M,-3.69%,6788,6166,6541.2,6300.7,72.84K,5.70%,319.88,294.7,296.18,313.07,172.77K 107 | 11/12/17,-7.65%,0.2092,0.175,0.2092,0.1932,48.68M,-7.60%,6465,5426,6282.4,5822.1,172.69K,-2.93%,316.99,293.33,313.07,303.9,251.26K 108 | 11/13/17,3.52%,0.2,0.19,0.1932,0.2,19.33M,11.21%,6680,5786.1,5806.5,6474.6,110.44K,3.07%,318,302.4,303.9,313.22,198.96K 109 | 11/14/17,2.05%,0.21,0.1965,0.2,0.2041,10.33M,1.62%,6687.8,6315.4,6476.5,6579.2,49.52K,6.72%,336.69,313.22,313.22,334.28,244.03K 110 | 11/15/17,2.25%,0.21,0.203,0.2041,0.2087,10.81M,10.63%,7310.2,6589.9,6589.9,7278.3,71.61K,-1.10%,339.61,321.5,334.28,330.59,167.05K 111 | 11/16/17,8.91%,0.2832,0.2055,0.2087,0.2273,97.46M,8.05%,8012.9,7099.9,7273.7,7864.2,85.88K,0.05%,335.11,321.18,330.59,330.76,149.13K 112 | 11/17/17,-1.23%,0.2408,0.217,0.2273,0.2245,25.33M,-2.37%,8029.8,7511.1,7865,7677.9,75.95K,0.07%,335.01,325,331.16,331,151.63K 113 | 11/18/17,1.11%,0.2295,0.2186,0.2245,0.227,11.18M,1.24%,7867,7419.5,7674.1,7773.3,40.70K,4.74%,350.4,325.32,331,346.68,148.23K 114 | 11/19/17,2.42%,0.2375,0.22,0.227,0.2325,18.76M,3.61%,8126.9,7652,7770.6,8054.2,39.13K,2.31%,371,343.28,346.68,354.7,176.58K 115 | 11/20/17,3.23%,0.247,0.2317,0.2325,0.24,15.37M,2.37%,8310.2,7943.4,8052.8,8245.1,38.28K,3.73%,373.7,352.03,354.7,367.94,148.45K 116 | 11/21/17,-2.96%,0.2456,0.2287,0.24,0.2329,19.92M,-1.79%,8380,7790,8245.1,8097.3,71.85K,-2.16%,373.5,350,367.94,360,199.14K 117 | 11/22/17,3.05%,0.2424,0.23,0.2329,0.24,17.00M,1.64%,8310,8064.3,8097.3,8230.1,28.86K,5.69%,381.89,358.8,360,380.48,138.90K 118 | 11/23/17,0.38%,0.2545,0.2351,0.24,0.2409,23.53M,-3.07%,8267.6,7977.1,8230,7977.1,32.10K,6.49%,426.27,374.34,380.48,405.19,264.29K 119 | 11/24/17,1.70%,0.2476,0.2348,0.2409,0.245,14.30M,2.69%,8350.7,7873,7977,8191.6,42.85K,16.12%,478.5,397.37,405.19,470.51,258.20K 120 | 11/25/17,3.39%,0.2562,0.242,0.245,0.2533,13.18M,7.01%,8770,8132.9,8191.6,8766.2,44.25K,-1.38%,481.99,454.4,469.89,464,168.49K 121 | 11/26/17,-3.32%,0.2533,0.241,0.2533,0.2449,16.31M,6.27%,9495,8769.2,8791,9316,67.57K,0.00%,464,464,464,464,- 122 | 11/27/17,1.18%,0.2532,0.24,0.2449,0.2478,22.19M,4.43%,9760.7,9268.9,9303.9,9728.8,66.66K,2.03%,491.89,458.25,464,473.44,191.77K 123 | 11/28/17,12.79%,0.2816,0.2478,0.2478,0.2795,44.71M,1.74%,9977.77,9608.3,9727.1,9898,47.11K,-1.66%,479,457.2,473.44,465.56,153.81K 124 | 11/29/17,-15.92%,0.28,0.21,0.2795,0.235,69.75M,-1.50%,11427.17,9001.1,9891.9,9749.4,182.74K,-9.71%,517,403.01,465.56,420.34,228.93K 125 | 11/30/17,0.94%,0.2477,0.2184,0.235,0.2372,29.91M,1.62%,10540,8821,9771.9,9907,129.07K,2.82%,454.95,385.4,420.34,432.21,224.57K 126 | 12/1/17,2.87%,0.2488,0.225,0.2372,0.244,22.46M,9.71%,10949,9370.1,9907,10869,84.14K,6.58%,467,413.96,432.21,460.67,169.74K 127 | 12/2/17,0.33%,0.2495,0.2398,0.244,0.2448,15.89M,0.11%,11187,10627,10852,10881,49.71K,-1.12%,472,447,460.67,455.51,135.33K 128 | 12/3/17,0.00%,0.2598,0.2344,0.2448,0.2448,25.35M,2.54%,11842,10299,10880,11157,93.06K,0.87%,482.69,431.04,455.51,459.49,137.97K 129 | 12/4/17,0.57%,0.25,0.2345,0.2448,0.2462,16.79M,3.93%,11598,10788,11162,11595,63.74K,1.20%,471.06,439.27,459.49,465,123.19K 130 | 12/5/17,-5.12%,0.2472,0.232,0.2462,0.2336,18.44M,0.00%,11949,11414,11611,11595,48.94K,-2.82%,467.38,444.17,465,451.87,187.53K 131 | 12/6/17,-7.15%,0.2342,0.2059,0.2336,0.2169,42.00M,16.66%,13598,11590,11590,13527,83.59K,-8.44%,454.23,403,451.87,413.71,367.19K 132 | 12/7/17,-6.69%,0.22,0.2,0.2169,0.2024,55.11M,22.72%,16639,13154,13500,16601,141.26K,0.32%,429,390,413.71,415.02,322.00K 133 | 12/8/17,15.07%,0.249,0.2,0.2024,0.2329,92.75M,-4.41%,17160,13774,16608,15869,124.11K,6.55%,453.61,400.34,415.02,442.19,318.98K 134 | 12/9/17,1.55%,0.245,0.2275,0.2329,0.2365,29.98M,-7.62%,16300,13021,15829,14660,77.82K,4.24%,487.8,441,442.19,460.92,322.50K 135 | 12/10/17,-3.68%,0.2376,0.2212,0.2365,0.2278,20.27M,2.30%,15728,12748,14660,14997,107.05K,-6.87%,460.92,413.3,460.92,429.24,250.23K 136 | 12/11/17,7.55%,0.2504,0.2278,0.2278,0.245,20.69M,11.72%,17443,14937,14937,16754,78.09K,20.04%,531.2,429.14,429.24,515.25,224.21K 137 | 12/12/17,41.80%,0.4205,0.24,0.245,0.3474,116.61M,1.27%,17500,16234,16754,16967,52.09K,23.22%,646.92,497.75,515.25,634.87,425.21K 138 | 12/13/17,29.82%,0.4927,0.32,0.3474,0.451,132.92M,-4.63%,17288,15674,17010,16181,62.88K,8.79%,742,573,634.87,690.69,686.14K 139 | 12/14/17,81.15%,0.847,0.446,0.451,0.817,143.37M,1.25%,16999,15870,16122,16383,45.72K,-0.61%,760,651,690.69,686.51,494.41K 140 | 12/15/17,-9.74%,0.825,0.6154,0.817,0.7374,87.98M,6.95%,18098,16352,16396,17522,63.11K,-1.20%,698.31,610,686.51,678.29,360.05K 141 | 12/16/17,0.35%,0.813,0.72,0.7374,0.74,41.17M,9.50%,19548,17098,17569.55,19187,48.27K,0.73%,711.96,672.51,678.29,683.25,200.94K 142 | 12/17/17,-3.78%,0.753,0.701,0.74,0.712,28.42M,-1.13%,19891,18622,19210,18971,51.80K,3.74%,725,683.24,683.25,708.78,210.62K 143 | 12/18/17,6.29%,0.7913,0.66,0.712,0.7568,45.64M,-0.20%,19171,18010,18959,18934,53.58K,10.61%,798.9,660,708.78,783.99,420.29K 144 | 12/19/17,-3.33%,0.841,0.6858,0.7568,0.7316,44.64M,-8.39%,18987,16500,18931,17345,66.65K,2.04%,863,750.01,783.99,799.98,518.29K 145 | 12/20/17,-2.28%,0.746,0.635,0.7316,0.7149,35.03M,-5.30%,17709,15500,17340,16425,82.16K,-0.62%,826.2,709,799.98,794.99,423.20K 146 | 12/21/17,52.47%,1.11,0.714,0.7149,1.09,91.16M,-4.62%,17333,14827,16433,15666.83,65.58K,-1.01%,848.08,747.1,794.99,786.97,341.95K 147 | 12/22/17,-9.36%,1.23,0.69,1.09,0.988,114.41M,-15.94%,15826,10718,15650,13170,179.00K,-20.18%,792,492.01,786.97,628.19,780.15K 148 | 12/23/17,-0.24%,1.07,0.92,0.988,0.9856,30.79M,6.57%,14986,12755,13173,14035,59.92K,7.07%,717,616.19,628.19,672.59,240.69K 149 | 12/24/17,-1.40%,0.9938,0.8024,0.9856,0.9718,31.76M,-3.98%,14047,11601.18,14036,13476,72.38K,-1.89%,675,560,672.59,659.89,312.62K 150 | 12/25/17,0.02%,1.02,0.9125,0.9718,0.972,12.03M,1.09%,14278,12678,13517,13623,45.61K,7.56%,737,651.76,659.89,709.81,218.49K 151 | 12/26/17,10.08%,1.1,0.9621,0.972,1.07,16.36M,15.09%,16048,13550,13627,15679,63.44K,5.63%,749.8,708.83,709.81,749.8,149.07K 152 | 12/27/17,13.08%,1.29,1.06,1.07,1.21,44.83M,-1.95%,16494,14463,15680,15374,54.99K,-1.78%,766.06,703.27,749.8,736.45,167.81K 153 | 12/28/17,2.48%,1.29,1.07,1.21,1.24,33.08M,-6.89%,15467,13232,15374,14315,72.89K,-3.40%,740.3,652,736.45,711.42,255.38K 154 | 12/29/17,54.84%,1.97,1.24,1.24,1.92,65.04M,0.01%,15105,13847,14323,14317,48.01K,2.83%,755,703.02,711.42,731.52,204.82K 155 | 12/30/17,-4.69%,2.4,1.74,1.92,1.83,78.98M,-13.55%,14403,11690,14308,12377,75.43K,-6.74%,737.56,640.43,731.52,682.22,267.70K 156 | 12/31/17,7.65%,2.09,1.5,1.83,1.97,34.43M,11.50%,14140,12183.88,12385,13800,43.29K,8.00%,741.99,675.56,682.22,736.77,153.38K 157 | 1/1/18,3.05%,2.1,1.8,1.97,2.03,13.77M,-3.23%,13893,12787,13794,13354,29.54K,2.13%,762,717.94,736.77,752.46,121.56K 158 | 1/2/18,7.88%,2.2,1.9,2.03,2.19,24.00M,10.15%,15300,12810,13448,14709.82,56.18K,14.13%,890,752.46,752.46,858.78,420.96K 159 | 1/3/18,24.20%,2.86,2.15,2.19,2.72,32.14M,3.03%,15428,14522,14713,15155,38.35K,9.69%,954.73,840,858.78,942.01,310.54K 160 | 1/4/18,0.37%,3.28,2.45,2.72,2.73,44.43M,0.03%,15390,14064,15150,15160,46.47K,-0.21%,997,893.24,942.01,940,348.62K 161 | 1/5/18,-8.42%,3.05,2.2,2.73,2.5,34.75M,11.59%,17101,14769,15159,16917,54.63K,2.42%,1023.6,930,939.3,962.77,298.24K 162 | 1/6/18,6.00%,2.85,2.45,2.5,2.65,11.26M,1.44%,17252,16251,16911,17161,29.61K,4.31%,1014.2,951.38,962.77,1004.3,127.79K 163 | 1/7/18,4.53%,2.81,2.56,2.65,2.77,9.10M,-5.62%,17176,15726,17163,16196,30.84K,11.10%,1116,999.5,1004.3,1115.8,199.83K 164 | 1/8/18,-13.36%,2.77067,1.91111,2.77067,2.4,20.76M,-7.82%,16279,13760,16216,14930,64.95K,1.21%,1225,968.12,1115.9,1129.3,439.43K 165 | 1/9/18,-14.98%,2.481,1.9,2.4,2.04055,18.91M,-3.40%,15355,14122,14902,14423,43.44K,13.67%,1299,1119.1,1129.4,1283.7,296.90K 166 | 1/10/18,-5.91%,2.118,1.6132,2.05,1.92,30.46M,3.28%,14896,13338,14426,14896,57.33K,-2.78%,1381.9,1203.2,1285.7,1248,380.43K 167 | 1/11/18,0.52%,2.267,1.54,1.94415,1.93,45.04M,-10.94%,14949.8,12639,14895,13266,71.70K,-9.01%,1331.8,1102.5,1245.9,1135.5,360.57K 168 | 1/12/18,4.30%,2.15,1.79,1.92446,2.013,15.70M,3.90%,14095,12778,13248,13783,37.42K,10.72%,1285,1083.4,1135.1,1257.2,209.24K 169 | 1/13/18,-1.14%,2.095,1.94701,2.013,1.99,7.95M,2.96%,14580,13760,13794,14191,29.01K,9.77%,1423.2,1252.6,1257,1380,202.78K 170 | 1/14/18,-8.54%,1.99,1.74,1.99,1.82,8.60M,-4.46%,14391,12874.34,14190,13558,35.60K,-2.17%,1385,1256,1379.9,1350,176.75K 171 | 1/15/18,-9.07%,1.8715,1.62,1.82,1.655,5.86M,0.13%,14350,13307,13558,13575,33.46K,-5.67%,1377.9,1264.4,1349.9,1273.4,137.68K 172 | 1/16/18,-30.96%,1.67763,0.85,1.655,1.14263,69.78M,-18.44%,13604,9949.4,13594,11072,131.86K,-19.89%,1278.8,868.98,1275.8,1020.1,672.02K 173 | 1/17/18,15.52%,1.386,0.87,1.14263,1.32,73.01M,0.09%,11490,9231.1,11059,11082,132.23K,-0.25%,1088.3,770.1,1019.6,1017.5,686.58K 174 | 1/18/18,17.12%,1.72042,1.2,1.32,1.546,49.19M,-0.33%,11881,10515,11101,11045,85.24K,-2.23%,1079,940,1020.1,994.81,374.07K 175 | 1/19/18,-1.55%,1.67,1.44406,1.546,1.522,19.73M,3.90%,11879,10649,11036,11476,48.55K,3.80%,1079,960.1,993.92,1032.6,174.91K 176 | 1/20/18,2.50%,1.62347,1.461,1.522,1.56,11.92M,10.91%,13002,11425,11462,12728,46.30K,10.98%,1160,1029.6,1032.6,1146,163.86K 177 | 1/21/18,-13.21%,1.56791,1.3,1.56,1.354,16.89M,-9.54%,12732,11020,12732,11514,53.62K,-8.64%,1146.3,1001.5,1146.3,1047,197.63K 178 | 1/22/18,-1.03%,1.41102,1.13031,1.354,1.34,22.90M,-6.45%,11886,10009,11519,10771,66.35K,-4.96%,1084.1,912.76,1047,995.08,238.82K 179 | 1/23/18,-0.49%,1.4342,1.17493,1.34,1.3335,23.42M,0.45%,11383,9901.1,10770,10819,63.85K,-1.22%,1022,905.38,995.26,982.98,228.08K 180 | 1/24/18,1.31%,1.42022,1.2822,1.3335,1.351,12.81M,5.50%,11529,10454,10811,11414,43.82K,8.16%,1068.8,952.04,982.11,1063.2,173.18K 181 | 1/25/18,-3.70%,1.375,1.272,1.351,1.301,7.75M,-2.35%,11723,10857,11402,11146,34.44K,-1.41%,1102.4,1025.1,1061.8,1048.2,162.09K 182 | 1/26/18,-7.30%,1.32082,1.1001,1.301,1.20599,16.51M,-0.68%,11647,10298,11144,11070,56.75K,-0.11%,1078.6,983,1048.2,1047,138.71K 183 | 1/27/18,1.06%,1.24473,1.17286,1.20599,1.21879,7.89M,3.53%,11683,10822,11068,11461,34.40K,6.48%,1125.3,1031.6,1046.9,1114.8,105.76K 184 | 1/28/18,12.41%,1.4,1.21416,1.21879,1.37,12.81M,3.30%,12181,11398,11455.13,11839,29.62K,11.82%,1264.8,1109,1114.7,1246.6,189.36K 185 | 1/29/18,-7.21%,1.37905,1.2509,1.37,1.27127,8.38M,-5.30%,11957,11074,11836,11212,25.65K,-5.74%,1259.8,1155.9,1245.5,1175,139.56K 186 | 1/30/18,-12.52%,1.27127,1.08807,1.27127,1.1121,14.64M,-9.25%,11250,9864.9,11215,10175,61.28K,-8.43%,1178.8,1041,1174.3,1076,246.88K 187 | 1/31/18,2.36%,1.14941,1.02578,1.1121,1.1384,9.32M,1.07%,10411,9761,10170,10284,43.23K,4.21%,1128.7,1027.8,1076.8,1121.3,136.70K 188 | 2/1/18,-15.14%,1.15067,0.905,1.1384,0.966,15.02M,-10.72%,10311,8941,10278,9181.1,78.78K,-7.58%,1167,985.01,1120.7,1036.3,285.60K 189 | 2/2/18,-6.43%,0.9688,0.67179,0.966,0.90388,41.10M,-3.11%,9201,7972.2,9181,8895.8,123.34K,-10.90%,1038.7,769.99,1036.2,923.3,520.79K 190 | 2/3/18,6.12%,1.02,0.77834,0.90388,0.95916,19.38M,3.64%,9495,8189.6,8887.1,9219.4,51.91K,5.32%,999,845,923.2,972.4,211.35K 191 | 2/4/18,-14.90%,0.9671,0.77931,0.95916,0.81624,13.53M,-11.06%,9403.3,7840,9225.07,8200,74.42K,-14.65%,972.69,776,972.19,829.98,340.10K 192 | 2/5/18,-16.19%,0.83452,0.64,0.81624,0.6841,27.62M,-15.25%,8378,6658.8,8185.2,6949.9,131.29K,-15.83%,858,641.01,827.9,698.62,547.57K 193 | 2/6/18,11.39%,0.78049,0.57227,0.6841,0.762,39.17M,10.42%,7860,6000,6946.6,7673.8,192.76K,11.88%,798.7,566,698.62,781.6,790.23K 194 | 2/7/18,-5.91%,0.822,0.6971,0.76764,0.717,15.43M,-1.13%,8488.2,7175.1,7679.4,7587,106.70K,-3.88%,848.6,716.3,782.99,751.25,416.98K 195 | 2/8/18,8.90%,0.78975,0.708,0.715,0.7808,10.90M,8.54%,8648.8,7579.6,7585,8235.1,77.62K,8.25%,845.88,749.88,752.88,813.2,236.13K 196 | 2/9/18,18.06%,0.92968,0.74,0.7808,0.92183,16.58M,5.44%,8748,7734.7,8240,8683.2,63.03K,8.08%,881.69,780.53,814.01,878.9,182.42K 197 | 2/10/18,11.48%,1.23,0.905,0.92183,1.02769,41.47M,-1.38%,9074.3,8152.1,8678.1,8563.1,68.15K,-3.06%,908.99,815.52,878.01,852,165.70K 198 | 2/11/18,-6.74%,1.03902,0.892,1.02769,0.9584,22.62M,-5.77%,8569,7851,8563,8069,52.21K,-4.85%,854.5,778.52,851.66,810.64,146.90K 199 | 2/12/18,8.76%,1.0764,0.9584,0.9584,1.0424,14.31M,10.31%,9000,8070,8070,8900.6,51.40K,6.88%,876.52,810.64,810.64,866.4,130.22K 200 | 2/13/18,-5.44%,1.04815,0.96333,1.0424,0.98573,8.27M,-4.32%,8952.8,8339.7,8902.9,8515.9,39.51K,-3.08%,869.26,821.57,866.4,839.69,130.39K 201 | 2/14/18,14.34%,1.154,0.97816,0.98573,1.12706,15.84M,11.03%,9488,8512.6,8515.9,9455.4,50.36K,9.46%,922,839.69,839.69,919.11,199.27K 202 | 2/15/18,-1.97%,1.14252,1.0655,1.12706,1.10488,13.29M,5.73%,10175,9338.8,9454.3,9996.9,67.53K,0.78%,945,903.2,919.13,926.32,205.52K 203 | 2/16/18,0.67%,1.11787,1.063,1.10488,1.11225,5.90M,1.65%,10270,9674.9,9996,10162,43.89K,1.19%,944,907,925.02,937.38,134.07K 204 | 2/17/18,5.63%,1.2,1.10182,1.11225,1.1749,8.72M,8.77%,11083,10050,10161,11053.46,52.80K,3.83%,973.55,933.52,937.37,973.28,124.67K 205 | 2/18/18,-9.34%,1.1785,1.0382,1.1749,1.0652,9.88M,-6.17%,11250,10122,11062,10372,69.83K,-6.27%,979,901,973.29,912.21,184.03K 206 | 2/19/18,3.90%,1.1328,1.0652,1.0652,1.10673,4.44M,7.72%,11250,10308,10398,11173,50.74K,2.96%,955.84,909.4,913.1,939.18,118.34K 207 | 2/20/18,-7.63%,1.1328,1.00756,1.10673,1.02233,9.13M,0.40%,11776,11101,11172,11218,60.92K,-5.82%,958.99,875,939.19,884.51,150.18K 208 | 2/21/18,-7.30%,1.042,0.93618,1.02233,0.94775,11.22M,-6.80%,11239,10200,11216,10455,76.96K,-5.28%,903.33,815.32,884.5,837.79,220.26K 209 | 2/22/18,-6.09%,0.99924,0.861,0.94775,0.89,10.92M,-5.98%,10912,9740,10453.22,9830,71.23K,-4.17%,868.94,788,837.8,802.85,180.65K 210 | 2/23/18,5.32%,0.98235,0.85001,0.89,0.93731,7.80M,3.20%,10395,9583.9,9826.5,10145,59.07K,6.22%,881.2,787,802.85,852.79,162.83K 211 | 2/24/18,-3.98%,0.96825,0.86818,0.93731,0.9,6.52M,-4.72%,10499,9350.3,10144,9666.3,55.70K,-2.50%,872.99,808.17,852.68,831.51,147.41K 212 | 2/25/18,0.11%,0.92298,0.873,0.9,0.901,4.33M,-1.13%,9840,9284.3,9666.3,9557.4,30.52K,0.84%,848.38,816.13,831.51,838.47,101.28K 213 | 2/26/18,3.11%,0.942,0.87376,0.901,0.92898,4.52M,7.99%,10437,9359.9,9583,10321,45.94K,3.49%,881.6,831.9,838.71,867.76,136.60K 214 | 2/27/18,-0.21%,0.95575,0.9175,0.92898,0.927,3.28M,2.40%,10880,10133,10320,10569,39.72K,0.41%,895,862.08,868.6,871.36,93.51K 215 | 2/28/18,-4.47%,0.9467,0.88005,0.927,0.88554,3.51M,-2.40%,11063,10270,10583,10315,43.89K,-2.31%,888.46,850.75,871.2,851.26,93.98K 216 | 3/1/18,3.23%,0.9485,0.874,0.88554,0.91415,3.88M,5.91%,11087,10224,10316,10925,33.87K,2.11%,881.3,845.61,851.25,869.24,90.09K 217 | 3/2/18,-1.64%,0.92109,0.88569,0.91415,0.89916,2.38M,0.92%,11189,10766,10908,11025,28.86K,-1.70%,879.37,849.73,869.23,854.5,58.05K 218 | 3/3/18,0.00%,0.9212,0.887,0.89916,0.89912,2.35M,3.76%,11526,11024,11024,11440,30.65K,0.09%,868.7,852.63,854.79,855.3,40.49K 219 | 3/4/18,12.01%,1.03,0.89,0.89912,1.00708,6.16M,0.53%,11544,11061,11454,11501,28.07K,1.26%,868.26,835.58,855.29,866.07,45.12K 220 | 3/5/18,-6.08%,1.09,0.942,1.00708,0.94582,17.25M,-0.74%,11696,11390,11497,11416,27.56K,-2.11%,870,847.76,866.06,847.76,55.13K 221 | 3/6/18,-4.84%,0.98133,0.891,0.94108,0.90001,11.94M,-6.10%,11403,10578,11403,10720,44.24K,-3.71%,850,803.59,848.14,816.31,89.00K 222 | 3/7/18,-5.46%,0.91233,0.7863,0.90001,0.85087,12.91M,-7.62%,10899,9422.09,10779,9902.9,75.22K,-8.22%,824.23,725.01,816.48,749.21,174.36K 223 | 3/8/18,-5.43%,0.87,0.79566,0.85087,0.80469,5.58M,-6.09%,10109,9037,9910.7,9300,67.75K,-6.93%,770,688.01,749.2,697.31,146.74K 224 | 3/9/18,2.03%,0.841,0.72929,0.80469,0.821,9.63M,-0.89%,9420.5,8351,9301.9,9217,98.20K,3.92%,727.81,639.04,697.3,724.61,229.75K 225 | 3/10/18,-5.72%,0.84,0.768,0.821,0.774,3.81M,-4.94%,9500,8691.1,9216.2,8762,52.54K,-6.20%,745,676.27,724.62,679.68,117.94K 226 | 3/11/18,4.99%,0.83,0.75,0.774,0.81265,5.85M,8.74%,9726.1,8429,8764.4,9528,70.48K,5.91%,734.2,660.15,679.68,719.86,139.84K 227 | 3/12/18,-4.01%,0.828,0.765,0.81265,0.7801,3.79M,-4.27%,9894.7,8776.8,9528,9121,67.58K,-3.24%,739.84,676.34,719.85,696.52,123.67K 228 | 3/13/18,-0.58%,0.7996,0.76066,0.7801,0.7756,3.69M,0.15%,9479,8827.7,9130.2,9135,61.54K,-1.15%,713.99,676.8,696.51,688.5,132.60K 229 | 3/14/18,-11.13%,0.78993,0.6523,0.7756,0.68928,6.32M,-10.38%,9400.1,7923.8,9135.2,8186.6,78.81K,-11.27%,702.41,585.34,689.1,610.92,205.41K 230 | 3/15/18,-1.02%,0.72333,0.628,0.68928,0.68226,6.62M,0.81%,8416.7,7666.3,8181.3,8252.9,82.58K,-0.17%,619.82,568.29,610.91,609.9,223.87K 231 | 3/16/18,-0.33%,0.71129,0.658,0.68226,0.68,4.43M,-0.02%,8602.7,7903.2,8250.1,8251,56.34K,-1.70%,626.04,584.5,609.91,599.56,133.52K 232 | 3/17/18,-7.56%,0.683,0.614,0.68,0.62861,5.47M,-4.85%,8350.1,7729.5,8250,7851,48.97K,-8.43%,609.36,543.3,598.77,549,141.33K 233 | 3/18/18,3.14%,0.685,0.53771,0.62861,0.64833,10.37M,4.45%,8285.6,7240,7832,8200.2,88.92K,-2.23%,560.99,453.65,548.82,536.73,661.85K 234 | 3/19/18,11.67%,0.7247,0.62561,0.64833,0.724,8.97M,4.88%,8689.9,8100,8209,8600.1,73.28K,3.40%,557.99,514.95,536.73,554.99,346.87K 235 | 3/20/18,-3.60%,0.724,0.658,0.724,0.6979,8.12M,3.48%,9025,8309.6,8600.2,8899.7,54.28K,0.25%,566.28,516.09,555,556.38,226.63K 236 | 3/21/18,-2.56%,0.70882,0.66059,0.6979,0.68,7.11M,0.00%,9175.2,8755.7,8899.8,8900.1,42.86K,0.66%,590,544.59,556.38,560.04,185.47K 237 | 3/22/18,-4.41%,0.69093,0.62082,0.68,0.65,5.17M,-2.18%,9088,8453.1,8888.6,8706.44,54.42K,-3.72%,577.27,515.36,559.22,539.19,181.65K 238 | 3/23/18,-1.38%,0.654,0.61231,0.65,0.641,3.77M,2.32%,8910,8272.8,8703.8,8908,44.91K,0.76%,543.66,505.72,539.2,543.28,193.13K 239 | 3/24/18,-2.14%,0.67871,0.6273,0.641,0.6273,3.45M,-4.19%,9040.2,8463,8911.4,8535,44.21K,-4.51%,545.24,518,543.86,518.8,108.76K 240 | 3/25/18,0.90%,0.654,0.6167,0.62737,0.63292,2.77M,-1.05%,8673.9,8373,8525,8445.1,30.69K,0.70%,535.65,513.06,519.05,522.41,81.71K 241 | 3/26/18,-7.10%,0.6382,0.57438,0.63292,0.588,6.91M,-3.86%,8496.4,7839.09,8445,8119.1,56.38K,-7.16%,525.37,466.9,522.41,485,224.43K 242 | 3/27/18,-3.31%,0.6025,0.557,0.588,0.56851,4.55M,-4.12%,8209,7727,8128,7784.5,50.41K,-7.66%,491.35,446.1,485.2,447.85,310.88K 243 | 3/28/18,0.43%,0.588,0.56411,0.56851,0.57098,2.56M,1.95%,8118,7725,7784.5,7936.1,35.08K,-0.55%,465.52,439.99,448.19,445.37,165.08K 244 | 3/29/18,-11.84%,0.57491,0.49545,0.57098,0.50335,7.60M,-10.61%,7963.9,6897.2,7936,7094,77.41K,-13.75%,448,379.6,445.37,384.11,470.08K 245 | 3/30/18,-0.23%,0.52512,0.47006,0.50335,0.50218,8.97M,-3.57%,7267.3,6533,7091.5,6840.4,108.25K,2.34%,411.12,364.66,384.1,393.09,501.96K 246 | 3/31/18,-1.03%,0.52133,0.4927,0.50218,0.497,4.63M,1.24%,7221.9,6782.9,6838.1,6925.3,68.02K,-0.03%,418.5,389,393.08,392.97,273.24K 247 | 4/1/18,-4.23%,0.50756,0.4546,0.497,0.476,5.63M,-1.66%,7035.1,6432.4,6925.4,6810,54.90K,-3.64%,398.84,358.01,393.37,378.67,325.75K 248 | 4/2/18,3.76%,0.50389,0.471,0.476,0.4939,3.46M,3.56%,7121.4,6770.2,6813.1,7052.7,44.01K,1.80%,393.99,375.26,378.68,385.5,196.17K 249 | 4/3/18,10.75%,0.5527,0.49192,0.4939,0.547,6.85M,5.00%,7509.6,7020,7073.8,7405.6,49.86K,7.76%,417.88,379.83,386.16,415.43,223.28K 250 | 4/4/18,-10.78%,0.5523,0.48505,0.547,0.48801,6.77M,-8.37%,7422,6670,7403.3,6785.9,53.72K,-9.01%,416.54,369.82,415.41,377.99,256.60K 251 | 4/5/18,0.64%,0.49646,0.47417,0.48801,0.49113,2.22M,-0.31%,6911,6571.9,6785.8,6765,45.85K,0.79%,387.1,366.12,378,380.98,182.50K 252 | 4/6/18,-3.58%,0.49425,0.4577,0.49113,0.47358,2.62M,-2.29%,6851.5,6501.1,6767.2,6610.2,42.14K,-2.95%,385.44,363.03,380.99,369.73,151.02K 253 | 4/7/18,2.43%,0.49604,0.46947,0.47358,0.4851,2.86M,4.27%,7075.4,6599.9,6610,6892.6,40.61K,3.90%,394.59,368.85,369.74,384.16,143.72K 254 | 4/8/18,2.66%,0.5009,0.48357,0.4851,0.498,1.46M,1.90%,7114.8,6883,6892.62,7023.9,29.33K,4.21%,404.07,384.16,384.16,400.34,134.99K 255 | 4/9/18,-2.85%,0.51145,0.4751,0.498,0.48382,4.61M,-3.69%,7187.4,6611,7024,6764.6,75.96K,-0.39%,430.73,387.31,400.33,398.79,329.86K 256 | 4/10/18,1.38%,0.49857,0.4775,0.48382,0.49048,2.35M,1.10%,6890.6,6650,6770.9,6839.3,26.15K,4.09%,417.9,391,398.84,415.12,146.65K -------------------------------------------------------------------------------- /Code/p1.Rmd: -------------------------------------------------------------------------------- 1 | ```{r} 2 | # Load required packages 3 | library(readr) 4 | library(lubridate) 5 | library(dplyr) 6 | 7 | # Read the CSV file 8 | df <- read.csv("/Users/ashleshkhajbage/Documents/IIT Spring 23/DPA /DPA PROJECT/DPA EDA/sentiment.csv")[, c(2, 8, 9)] 9 | 10 | # Rename the columns if needed 11 | colnames(df) <- c("Date", "Positive Sentiment", "Negative Sentiment") 12 | 13 | # Convert the Date column to a date object 14 | df$Date <- as_date(ymd_hms(df$Date)) 15 | 16 | # Set the Date column as the index and sort by index 17 | df <- df %>% arrange(Date) 18 | 19 | # Print the dimensions of the dataframe 20 | print(dim(df)) 21 | 22 | # Print the first 5 rows 23 | head(df, 5) 24 | ``` 25 | 26 | ```{r} 27 | str(df) 28 | ``` 29 | 30 | The first thing we need to resolve is how to score dates that have more than one Sentiment Score. This means there were several different articles parsed for that day. For instance, we can see below, September 8$^{th}$ had 4 different article parsed 31 | 32 | ```{r} 33 | # Sort the dataframe by row names (assuming it's an index) 34 | df_sorted <- df[order(rownames(df)), ] 35 | 36 | # Subset the dataframe to rows 26 to 30 (inclusive) 37 | df_subset <- df_sorted[26:30, ] 38 | df_subset 39 | ``` 40 | 41 | There's a few ways we can handle this situation. We can take the Average of these values to give an overall sentiment for the day. A better way to average values to better represent orders of magnitude of each individual value is the Root Mean Square (RMS) which is simplyt $\sqrt{x_1^2 + x_2^2 + ... + x_n^2}$. And finally, we can simply sum the values. After performing this aggregations, let's then combine the negative and positive sentiment score to create some meaningful "Overall Sentiment" for each day. We will do this by simply summing the Positive Sentiment and Negative Sentiment 42 | 43 | ```{r} 44 | head(df, 5) 45 | ``` 46 | 47 | ```{r} 48 | library(dplyr) 49 | 50 | # group the data by Date 51 | df <- df %>% 52 | group_by(Date) %>% 53 | 54 | # compute the mean, sum, and RMS of Positive Sentiment 55 | mutate(`Positive Sentiment Averaged` = mean(`Positive Sentiment`), 56 | `Positive Sentiment Summed` = sum(`Positive Sentiment`), 57 | `Positive Sentiment RMS` = sqrt(mean(`Positive Sentiment`^2))) %>% 58 | 59 | # compute the mean, sum, and RMS of Negative Sentiment 60 | mutate(`Negative Sentiment Averaged` = mean(`Negative Sentiment`), 61 | `Negative Sentiment Summed` = sum(`Negative Sentiment`), 62 | `Negative Sentiment RMS` = sqrt(mean(`Negative Sentiment`^2))) %>% 63 | 64 | # compute the overall sentiment 65 | mutate(`Overall Sentiment` = `Positive Sentiment` + `Negative Sentiment`) %>% 66 | 67 | # compute the mean, sum, and RMS of Overall Sentiment 68 | mutate(`Overall Sentiment Averaged` = mean(`Overall Sentiment`), 69 | `Overall Sentiment Summed` = sum(`Overall Sentiment`), 70 | `Overall Sentiment RMS` = sqrt(mean(`Overall Sentiment`^2))) %>% 71 | 72 | # remove the grouping 73 | ungroup() 74 | 75 | head(df) 76 | ``` 77 | 78 | ```{r} 79 | df <- df %>% 80 | arrange(Date) 81 | 82 | # select rows 25 to 26 83 | df_subset <- df %>% 84 | slice(25:35) 85 | 86 | df_subset 87 | ``` 88 | 89 | I see the Mistake, there are multiple records for same date, these are duplicate records, we can summarise function to merge them into single one. 90 | 91 | ```{r} 92 | library(dplyr) 93 | 94 | # group the data by Date and summarize the columns 95 | df <- df %>% 96 | group_by(Date) %>% 97 | 98 | summarize(`Positive Sentiment Averaged` = mean(`Positive Sentiment`), 99 | `Positive Sentiment Summed` = sum(`Positive Sentiment`), 100 | `Positive Sentiment RMS` = sqrt(mean(`Positive Sentiment`^2)), 101 | `Negative Sentiment Averaged` = mean(`Negative Sentiment`), 102 | `Negative Sentiment Summed` = sum(`Negative Sentiment`), 103 | `Negative Sentiment RMS` = sqrt(mean(`Negative Sentiment`^2)), 104 | `Overall Sentiment Averaged` = mean(`Positive Sentiment` + `Negative Sentiment`), 105 | `Overall Sentiment Summed` = sum(`Positive Sentiment` + `Negative Sentiment`), 106 | `Overall Sentiment RMS` = sqrt(mean((`Positive Sentiment` + `Negative Sentiment`)^2))) %>% 107 | 108 | # remove the grouping 109 | ungroup() 110 | 111 | # view the first few rows of the modified data frame 112 | head(df) 113 | 114 | ``` 115 | 116 | ```{r} 117 | df <- df %>% 118 | arrange(Date) 119 | 120 | # select rows 25 to 26 121 | df_subset <- df %>% 122 | slice(26) 123 | 124 | df_subset 125 | ``` 126 | 127 | ```{r} 128 | str(df) 129 | ``` 130 | 131 | ### Historical Price Data 132 | 133 | ```{r} 134 | library(data.table) 135 | 136 | 137 | df2 <- read.csv('/Users/ashleshkhajbage/Documents/IIT Spring 23/DPA /DPA PROJECT/DPA EDA/historical_pricing.csv', header = TRUE) 138 | names(df2)[1] <- "Date" 139 | df2 <- df2[-1,] 140 | df2$Date <- as.Date(df2$Date, format = '%m/%d/%y') 141 | df2 <- df2[order(df2$Date),] 142 | df2 143 | 144 | ``` 145 | ```{r} 146 | # Print the dimensions of the data frame 147 | cat("shape of data frame: ", dim(df2), "\n") 148 | cat("*************************************\n") 149 | # Print the column names 150 | cat("columns/variables/features in datasets:\n") 151 | cat(names(df2), "\n") 152 | cat("*************************************\n") 153 | 154 | # Print the numerical columns 155 | num_cols <- sapply(df2, is.numeric) 156 | cat("Numerical columns in dataset:\n") 157 | cat(names(df2[num_cols]), "\n") 158 | cat("*************************************\n") 159 | 160 | # Print the categorical columns 161 | cat_cols <- sapply(df2, is.factor) 162 | cat_cols <- cat_cols | sapply(df2, is.character) 163 | cat("Categorical columns in dataset:\n") 164 | cat(names(df2[cat_cols]), "\n") 165 | ``` 166 | The price data is actually numerical columns, We have to fix these, we fixed it using change format and rename column names. 167 | ```{r} 168 | str(df2) 169 | ``` 170 | ```{r} 171 | colSums(is.na(df2)) 172 | 173 | # #no missing values present 174 | ``` 175 | This will return a vector with the number of missing values in each column of the data frame. If the result shows all zeros, it means there are no missing values present in the data frame. If there are missing values, the corresponding columns will show non-zero values. 176 | 177 | 178 | ```{r} 179 | # Count duplicate rows in the crypto_df data frame 180 | sum(duplicated(df2)) 181 | 182 | #no duplicate values is present in dataset 183 | ``` 184 | 185 | 186 | 187 | ```{r} 188 | 189 | # Rename the columns 190 | colnames(df2) <- c("Date", "XRP_Change","XRP_High","XRP_Low", "XRP_Open", "XRP_Price", "XRP_Vol", "BTC_Change", "BTC_High", "BTC_Low", "BTC_Open", "BTC_Price", "BTC_Vol", "ETH_Change", "ETH_High", "ETH_Low", "ETH_Open", "ETH_Price", "ETH_Vol") 191 | 192 | head(df2) 193 | ``` 194 | 195 | ```{r} 196 | library(dplyr) 197 | # Full Outer Join 198 | df3 <- merge(df, df2, by.x = "Date",by.y="Date", all.x= TRUE,all.y=TRUE ,sort = TRUE) 199 | df3 <- df3[-c(1:6),] 200 | df3 <- df3[-1,] 201 | df3[,-1] <- lapply(df3[,-1], function(x) ifelse(is.na(x), 0, x)) 202 | ``` 203 | 204 | ```{r} 205 | df3$XRP_Change <- as.numeric(sub("%", "", df3$XRP_Change)) 206 | df3$XRP_High <- as.numeric(sub("%", "",df3$XRP_High)) 207 | df3$XRP_Low <- as.numeric(sub("%", "",df3$XRP_Low )) 208 | df3$XRP_Open <- as.numeric(sub("%", "",df3$XRP_Open )) 209 | df3$XRP_Price <- as.numeric(sub("%", "",df3$XRP_Price )) 210 | 211 | 212 | df3$BTC_Change <- as.numeric(sub("%", "", df3$BTC_Change)) 213 | df3$BTC_High <- as.numeric(sub("%", "",df3$BTC_High)) 214 | df3$BTC_Low <- as.numeric(sub("%", "",df3$BTC_Low )) 215 | df3$BTC_Open <- as.numeric(sub("%", "",df3$BTC_Open )) 216 | df3$BTC_Price <- as.numeric(sub("%", "",df3$BTC_Price )) 217 | 218 | 219 | 220 | df3$ETH_Change <- as.numeric(sub("%", "", df3$ETH_Change)) 221 | df3$ETH_High <- as.numeric(sub("%", "",df3$ETH_High))z 222 | df3$ETH_Low <- as.numeric(sub("%", "",df3$ETH_Low )) 223 | df3$ETH_Open <- as.numeric(sub("%", "",df3$ETH_Open )) 224 | df3$ETH_Price <- as.numeric(sub("%", "",df3$ETH_Price )) 225 | 226 | 227 | df3$XRP_Vol <- as.numeric(sub("M", "", df3$XRP_Vol))/1000 228 | df3$BTC_Vol <- as.numeric(sub("K", "", df3$BTC_Vol)) 229 | df3$ETH_Vol <- as.numeric(sub("K", "", df3$ETH_Vol)) 230 | ``` 231 | 232 | ```{r} 233 | convert_thousands <- function(x) { 234 | x <- (x * 1000000) / 1000 235 | return(x) 236 | } 237 | ``` 238 | 239 | ```{r} 240 | df3$XRP_Vol<- df3$XRP_Vol * 1000000 / 1000 241 | df3$XRP_Change <- c(df3$XRP_Change[-1], 0) 242 | df3$XRP_Price <- c(df3$XRP_Price[-1], 0) 243 | ``` 244 | 245 | ```{r} 246 | # view the fixed data frame 247 | df3 248 | ``` 249 | 250 | ```{r} 251 | summary(df3) 252 | ``` 253 | 254 | 255 | ```{r} 256 | # generate the descriptive statistics with fivenum function 257 | desc_stats <- apply(df3[,2:9], 2, fivenum) 258 | desc_stats 259 | # create a data frame from the statistics 260 | desc_stats_df<- data.frame(t(desc_stats)) 261 | colnames(desc_stats_df) <- c("Min", "25%", "Median", "75%", "Max") 262 | desc_stats_df$Mean <- apply(df3[,2:9], 2, mean) 263 | desc_stats_df$SD <- apply(df3[,2:9], 2, sd) 264 | desc_stats_df$Count <- apply(df3[,2:9], 2, function(x) sum(!is.na(x))) 265 | desc_stats1<- data.frame(t(desc_stats_df)) 266 | 267 | # print the data frame 268 | desc_stats1 269 | ``` 270 | 271 | ```{r} 272 | # function to compute statistics including missing values 273 | my_stats <- function(x) { 274 | c(min(x, na.rm=TRUE), quantile(x, probs=c(0.25, 0.5, 0.75), na.rm=TRUE), 275 | max(x, na.rm=TRUE), sum(!is.na(x))) 276 | } 277 | # compute descriptive statistics 278 | numeric_cols <- sapply(df3[, 11:(ncol(df3) - 1)], is.numeric) 279 | desc_statss <- apply(df3[, 11:(ncol(df3) - 1)][, numeric_cols], 2, my_stats) 280 | 281 | # create a data frame from the statistics 282 | desc_stats_df1 <- data.frame(t(desc_statss)) 283 | colnames(desc_stats_df1) <- c("Min", "25%", "Median", "75%", "Max", "Count") 284 | desc_stats_df1$Mean <- colMeans(df3[, 11:(ncol(df3) - 1)][, numeric_cols], na.rm=TRUE) 285 | desc_stats_df1$SD <- apply(df3[, 11:(ncol(df3) - 1)][, numeric_cols], 2, sd, na.rm=TRUE) 286 | desc_stats_df2 <- t(desc_stats_df1) 287 | 288 | # print the data frame 289 | library(tibble) 290 | as_tibble(desc_stats_df2) 291 | ``` 292 | 293 | ```{r} 294 | # Remove rows with NA values 295 | df_clean <- na.omit(desc_stats_df2) 296 | 297 | # Create the correlation matrix 298 | corr_matrix <- cor(df_clean) 299 | 300 | # Select the columns 301 | selected_columns <- corr_matrix[, c("XRP_Change", "XRP_Price")] 302 | 303 | # Print the selected columns 304 | print(selected_columns) 305 | 306 | ``` 307 | 308 | ```{r} 309 | library(ggplot2) 310 | library(gridExtra) 311 | 312 | # Assuming df3 is a data frame in R 313 | 314 | # Get the first 9 column names 315 | y_vars <- colnames(df3)[1:9] 316 | 317 | # Create a list to store the individual plots 318 | plot_list <- list() 319 | 320 | # Loop through the y_vars and create a scatter plot for each 321 | for (i in seq_along(y_vars)) { 322 | y_var <- y_vars[i] 323 | plot1 <- ggplot(df3, aes(x = XRP_Price, y = .data[[y_var]])) + 324 | geom_point() + 325 | theme_minimal() + 326 | xlab("XRP_Price") + 327 | ylab(y_var) 328 | plot2 <- ggplot(df3, aes(x = XRP_Change, y = .data[[y_var]])) + 329 | geom_point() + 330 | theme_minimal() + 331 | xlab("XRP_Change") + 332 | ylab(y_var) 333 | 334 | # Combine the plots for XRP_Price and XRP_Change for the current y_var 335 | combined_plot <- grid.arrange(plot1, plot2, ncol = 2) 336 | 337 | # Add the combined plot to the plot list 338 | plot_list[[i]] <- combined_plot 339 | } 340 | 341 | # Display the plots in a grid 342 | do.call("grid.arrange", c(plot_list, ncol = 2)) 343 | 344 | ``` 345 | 346 | ```{r} 347 | library(ggplot2) 348 | library(gridExtra) 349 | 350 | # Define the columns to use 351 | x_vars <- c("XRP_Price", "XRP_Change") 352 | y_vars <- c("BTC_High", "BTC_Low", "BTC_Price", "ETH_High", "ETH_Low", "ETH_Price") 353 | 354 | # Create a list to store the individual plots 355 | plot_list <- list() 356 | 357 | # Loop through the y_vars and create a scatter plot for each 358 | for (i in seq_along(y_vars)) { 359 | y_var <- y_vars[i] 360 | plot1 <- ggplot(df3, aes(x = .data[[x_vars[1]]], y = .data[[y_var]])) + 361 | geom_point() + 362 | theme_minimal() + 363 | xlab(x_vars[1]) + 364 | ylab(y_var) 365 | plot2 <- ggplot(df3, aes(x = .data[[x_vars[2]]], y = .data[[y_var]])) + 366 | geom_point() + 367 | theme_minimal() + 368 | xlab(x_vars[2]) + 369 | ylab(y_var) 370 | 371 | # Combine the plots for the x_vars for the current y_var 372 | combined_plot <- grid.arrange(plot1, plot2, ncol = 2) 373 | 374 | # Add the combined plot to the plot list 375 | plot_list[[i]] <- combined_plot 376 | } 377 | 378 | # Display the plots in a grid 379 | do.call("grid.arrange", c(plot_list, ncol = 2)) 380 | 381 | ``` 382 | 383 | ```{r} 384 | library(caret) 385 | scaler <- preProcess(df3[,c('XRP_Price','BTC_Price','ETH_Price')], method = c("center", "scale")) 386 | scaled_data <- predict(scaler, df3[,c('XRP_Price','BTC_Price','ETH_Price')]) 387 | scaled_data <- as.data.frame(scaled_data) 388 | colnames(scaled_data) <- c('XRP','BTC','ETH') 389 | rownames(scaled_data) <- rownames(df3) 390 | head(scaled_data) 391 | ``` 392 | 393 | ```{r} 394 | library(ggplot2) 395 | 396 | # Scale the data 397 | scaled_data <- as.data.frame(scale(df3[, c("XRP_Price", "BTC_Price", "ETH_Price")])) 398 | colnames(scaled_data) <- c("XRP", "BTC", "ETH") 399 | scaled_data$Date <- df3$Date 400 | scaled_data <- scaled_data[!is.na(scaled_data$Date), ] 401 | 402 | # Plot the data 403 | ax <- ggplot(scaled_data, aes(x = Date)) + 404 | geom_line(aes(y = XRP, colour = "XRP", linetype = "solid"), size = 1) + 405 | geom_line(aes(y = BTC, colour = "BTC", linetype = "solid"), size = 1) + 406 | geom_line(aes(y = ETH, colour = "ETH", linetype = "solid"), size = 1) + 407 | labs(x = "Date", y = "Normalized Price", title = "XRP - BTC - ETH PRICE") + 408 | scale_colour_manual(values = c("blue", "green", "red")) + 409 | theme_bw() 410 | 411 | # Remove axes labels 412 | ax <- ax + theme(axis.title.x = element_blank(), axis.title.y = element_blank()) 413 | 414 | # Remove ticks and tick labels 415 | ax <- ax + theme(axis.text.x = element_blank(), axis.text.y = element_blank()) 416 | ax <- ax + theme(axis.ticks.x = element_blank(), axis.ticks.y = element_blank()) 417 | 418 | # Display the plot 419 | print(ax) 420 | which(is.na(scaled_data)) 421 | ``` 422 | 423 | ```{r} 424 | library(caret) 425 | scaler <- preProcess(df3[,c('BTC_High','BTC_Low','ETH_High','ETH_Low','XRP_Price')], method = "range") 426 | data <- predict(scaler, df3[,c('BTC_High','BTC_Low','ETH_High','ETH_Low','XRP_Price')]) 427 | data <- as.data.frame(data, col.names = c('BTC_High','BTC_Low','ETH_High','ETH_Low','XRP_Price'), row.names = rownames(df3)) 428 | ``` 429 | 430 | ```{r} 431 | library(ggplot2) 432 | 433 | # plot BTC price with XRP price 434 | ggplot(df3, aes(x = Date)) + 435 | geom_line(aes(y = BTC_High), color = 'green') + 436 | geom_line(aes(y = BTC_Low), color = 'red') + 437 | geom_line(aes(y = BTC_Price), color = 'black', linetype = 'dashed') + 438 | geom_ribbon(aes(ymin = BTC_Low, ymax = BTC_High), fill = 'red', alpha = 0.4) + 439 | labs(x = 'Date', y = 'Price', title = 'XRP Price vs BTC HLC') + 440 | theme_bw() + 441 | scale_y_continuous(sec.axis = sec_axis(~ ., name = 'XRP_Price', breaks = seq(0, 4, 0.5))) + 442 | theme(legend.position = 'bottom') 443 | 444 | # plot ETH price with XRP price 445 | ggplot(df3, aes(x = Date)) + 446 | geom_line(aes(y = ETH_High), color = 'green') + 447 | geom_line(aes(y = ETH_Low), color = 'red') + 448 | geom_line(aes(y = ETH_Price), color = 'black', linetype = 'dashed') + 449 | geom_ribbon(aes(ymin = ETH_Low, ymax = ETH_High), fill = 'red', alpha = 0.4) + 450 | labs(x = 'Date', y = 'Price', title = 'XRP Price vs ETH HLC') + 451 | theme_bw() + 452 | scale_y_continuous(sec.axis = sec_axis(~ ., name = 'XRP_Price', breaks = seq(0, 4, 0.5))) + 453 | theme(legend.position = 'bottom') 454 | 455 | ``` 456 | 457 | ```{r} 458 | lm_p <- lm(XRP_Price ~ `Positive Sentiment Summed`, data = df3) 459 | lm_n <- lm(XRP_Price ~ `Negative Sentiment Summed`, data = df3) 460 | 461 | y_p <- predict(lm_p) 462 | y_n <- predict(lm_n) 463 | ``` 464 | 465 | ```{r} 466 | library(ggplot2) 467 | library(ggforce) 468 | 469 | ggplot(df3, aes(x = `Negative Sentiment RMS`, y = XRP_Price)) + 470 | geom_point(aes(color = "Negative Sentiment"), alpha = 0.4, shape = 20) + 471 | geom_point(aes(x = `Positive Sentiment RMS`, y = XRP_Price, color = "Positive Sentiment"), alpha = 0.4, shape = 20) + 472 | scale_color_manual(values = c("Negative Sentiment" = "red", "Positive Sentiment" = "green")) + 473 | labs(x = "Negaitve - Positve Sentiment RMS", y = "XRP Price", title = "Sentiment Analysis vs. XRP Price") + 474 | stat_ellipse(aes(x0 = -0.3, y0 = 1.5, a = 0.2, b = 2.8, angle = 348), type = "norm", level = 0.95, geom = "polygon", color = "gray", fill = "gray", alpha = 0.2, linetype = 0, size = 2) + 475 | stat_ellipse(aes(x0 = 0.3, y0 = 1.9, a = 0.2, b = 2.7, angle = 349), type = "norm", level = 0.95, geom = "polygon", color = "gray", fill = "gray", alpha = 0.2, linetype = 0, size = 2) + 476 | theme_minimal() 477 | 478 | ggplot(df3, aes(x = `Negative Sentiment Summed`, y = XRP_Price)) + 479 | geom_point(aes(color = "Negative Sentiment"), alpha = 0.4, shape = 20) + 480 | geom_point(aes(x = `Positive Sentiment Summed`, y = XRP_Price, color = "Positive Sentiment"), alpha = 0.4, shape = 20) + 481 | scale_color_manual(values = c("Negative Sentiment" = "red", "Positive Sentiment" = "green")) + 482 | labs(x = "Negative - Positive Sentiment Summed", y = "XRP Price", title = "Sentiment Analysis vs. XRP Price") + 483 | stat_smooth(aes(x = `Positive Sentiment Summed`, y = XRP_Price), method = "lm", color = "green") + 484 | stat_smooth(aes(x = `Negative Sentiment Summed`, y = XRP_Price), method = "lm", color = "red") + 485 | theme_minimal() 486 | 487 | 488 | ``` 489 | 490 | ```{r} 491 | 492 | library(ggplot2) 493 | library(gridExtra) 494 | 495 | # create the first plot 496 | p1 <- ggplot(df3, aes(x = Date)) + 497 | geom_line(aes(y = XRP_Price, colour = "Price"), size = 0.5) + 498 | geom_ribbon(aes(ymin = 0, ymax = XRP_Price, fill = "Price"), alpha = 0.4) + 499 | geom_line(aes(y = `Positive Sentiment RMS`, colour = "Positive Sentiment RMS"), size = 0.5) + 500 | geom_ribbon(aes(ymin = 0, ymax = `Positive Sentiment RMS`, fill = "Positive Sentiment RMS"), alpha = 0.4) + 501 | geom_line(aes(y = `Negative Sentiment RMS`, colour = "Negative Sentiment RMS"), size = 0.5) + 502 | geom_ribbon(aes(ymin = 0, ymax = `Negative Sentiment RMS`, fill = "Negative Sentiment RMS"), alpha = 0.4) + 503 | scale_fill_manual(values = c("Price" = "blue", "Positive Sentiment RMS" = "green", "Negative Sentiment RMS" = "red")) + 504 | scale_color_manual(values = c("Price" = "black", "Positive Sentiment RMS" = "black", "Negative Sentiment RMS" = "black")) + 505 | labs(x = "", y = "Price / Sentiment RMS", color = "", fill = "") + 506 | ggtitle("Price with Sentiment RMS") + 507 | theme_classic() + 508 | theme(plot.title = element_text(size = 18, face = "bold"), 509 | legend.position = "bottom", 510 | legend.key.size = unit(0.8, "cm"), 511 | legend.text = element_text(size = 14), 512 | legend.title = element_blank(), 513 | axis.text = element_text(size = 14), 514 | axis.title = element_text(size = 16)) 515 | 516 | # create the second plot 517 | p2 <- ggplot(df3, aes(x = Date)) + 518 | geom_line(aes(y = XRP_Price, colour = "Price"), size = 0.5) + 519 | geom_ribbon(aes(ymin = 0, ymax = XRP_Price, fill = "Price"), alpha = 0.4) + 520 | geom_line(aes(y = `Positive Sentiment Summed`, colour = "Positive Sentiment Summed"), size = 0.5) + 521 | geom_ribbon(aes(ymin = 0, ymax = `Positive Sentiment Summed`, fill = "Positive Sentiment Summed"), alpha = 0.4) + 522 | geom_line(aes(y = `Negative Sentiment Summed`, colour = "Negative Sentiment Summed"), size = 0.5) + 523 | geom_ribbon(aes(ymin = 0, ymax = `Negative Sentiment Summed`, fill = "Negative Sentiment Summed"), alpha = 0.4) + 524 | scale_fill_manual(values = c("Price" = "blue", "Positive Sentiment Summed" = "green", "Negative Sentiment Summed" = "red")) + 525 | scale_color_manual(values = c("Price" = "black", "Positive Sentiment Summed" = "black", "Negative Sentiment Summed" = "black")) + 526 | labs(x = "", y = "Price / Sentiment Summed", color = "", fill = "") + 527 | ggtitle("Price with Sentiment Summed") + 528 | theme_classic() + 529 | theme(plot.title = element_text(size = 18, face = "bold"), 530 | legend.position = "bottom", 531 | legend.key.size = unit(0.8, "cm"), 532 | legend.text = element_text(size = 14), 533 | legend.title = element_blank(), 534 | axis.text = element_text(size = 14), 535 | axis.title = element_text(size = 16)) 536 | grid.arrange(p1, ncol = 1, heights = c(2, 1)) 537 | grid.arrange(p2, ncol = 1, heights = c(2, 1)) 538 | 539 | ``` 540 | 541 | Again, we can see that Sentiment RMS doesn't translate very well to a change in XRP price like Sentiment Summed does. At XRP's highest Price point, Sentiment RMS has a value no higher than when XRP's price point was close to it's lowest. Sentiment Summed however, does reflect a huge leap in XRP Price at the same instance Sentiment explodes as well. However take note that these sentiments are purely day to day sentiments. But when an investor is investing, they wouldn't only look at articles on the day they were investing. They would research days, and sometimes weeks prior to determine sentiment and performance. Therefore, a days sentiment should also reflect previous days' sentiment as well. This will not only help smooth out the sentiment curve, but take into account for all 0 values of sentiment that the sentiment might not actually be 0. A value of 0 can simply mean that no article was written on that day, so Sentiment from a previous day would simply roll into that day. If There had been extremely high sentiment for the past week, but today there were no articles written on XRP, that doesn't mean that Sentiment on the coin has dropped within the market, it just simply means that no article was written today on the coin. We must account for this. It's not unreasonable to speculate that an investor might look at a coins weekly performance when determining strategy. Therefore, let's perform a 5 day rolling average for sentiment. When averaging the values however, yesterday's value being averaged into today will be it's original value, not it's rolling average value from when the 5 day average was performed on it. For example if we were performing a 3 day rolling average: 542 | 543 | Day 20 - Original Value: 2 \| 3-Day Average: 2.7 544 | 545 | Day 21 - Original Value: 1 \| 3-Day Average: 2.5 546 | 547 | Day 23 - Original Value: 4 \| 3-Day Average: 3.5 548 | 549 | Notice from day 3, it got it's 3 day average from the original values of the previous 2 days, not their 3 Day Average 550 | 551 | ```{r} 552 | boxfilter <- function(df, col) { 553 | # create copies so as to not overwrite original dataframe 554 | c <- df[[col]] 555 | d <- c 556 | # overwrite values in d with rolling averages of the last 5 values in c 557 | for (i in 5:length(c)) { 558 | d[i] <- mean(c((c[(i-4):i]))) 559 | } 560 | # create new column to write to dataframe 561 | column <- paste0(strsplit(col, ' ')[[1]][length(strsplit(col, ' ')[[1]])], '_box_filter') 562 | # set column equal to averaged sentiments within the dataframe 563 | df[column] <- d 564 | # return original dataframe with new column 565 | return(df) 566 | } 567 | 568 | 569 | ``` 570 | 571 | ```{r} 572 | df4 <- df3 573 | df4 = boxfilter(df4, 'Overall Sentiment RMS') 574 | df4 = boxfilter(df4, 'Overall Sentiment Summed') 575 | df4 = boxfilter(df4, 'Overall Sentiment Averaged') 576 | ``` 577 | 578 | ```{r} 579 | library(ggplot2) 580 | library(gridExtra) 581 | 582 | # create the first plot 583 | p1 <- ggplot(df3, aes(x = Date)) + 584 | geom_line(aes(y = XRP_Price, colour = "Price"), size = 0.5) + 585 | geom_ribbon(aes(ymin = 0, ymax = XRP_Price, fill = "Price"), alpha = 0.4) + 586 | geom_line(aes(y = `Positive Sentiment RMS`, colour = "Positive Sentiment RMS"), size = 0.5) + 587 | geom_ribbon(aes(ymin = 0, ymax = `Positive Sentiment RMS`, fill = "Positive Sentiment RMS"), alpha = 0.4) + 588 | geom_line(aes(y = `Negative Sentiment RMS`, colour = "Negative Sentiment RMS"), size = 0.5) + 589 | geom_ribbon(aes(ymin = 0, ymax = `Negative Sentiment RMS`, fill = "Negative Sentiment RMS"), alpha = 0.4) + 590 | scale_fill_manual(values = c("Price" = "blue", "Positive Sentiment RMS" = "green", "Negative Sentiment RMS" = "red")) + 591 | scale_color_manual(values = c("Price" = "black", "Positive Sentiment RMS" = "black", "Negative Sentiment RMS" = "black")) + 592 | labs(x = "", y = "Price / Sentiment RMS", color = "", fill = "") + 593 | ggtitle("Price with Sentiment RMS") + 594 | theme_classic() + 595 | theme(plot.title = element_text(size = 18, face = "bold"), 596 | legend.position = "bottom", 597 | legend.key.size = unit(0.8, "cm"), 598 | legend.text = element_text(size = 14), 599 | legend.title = element_blank(), 600 | axis.text = element_text(size = 14), 601 | axis.title = element_text(size = 16)) 602 | grid.arrange(p1, ncol = 1, heights = c(2, 1)) 603 | 604 | # create the second plot 605 | par(mfrow = c(2,1), mar = c(4, 4, 2, 1), oma = c(0, 0, 2, 0)) 606 | plot(df4$XRP_Price, type = "l", col = "black", lwd = 0.5, xaxt = "n", xlab = "", ylab = "Price / RMS Sentiment") 607 | polygon(c(1:length(df4$XRP_Price), length(df4$XRP_Price):1), c(rep(0, length(df4$XRP_Price)), rev(df4$XRP_Price)), col = "blue", border = NA, alpha = 0.4) 608 | lines(df4$Summed_box_filter, col = "black", lwd = 0.5) 609 | polygon(c(1:length(df4$Summed_box_filter), length(df4$Summed_box_filter):1), c(rep(0, length(df4$Summed_box_filter)), rev(df4$Summed_box_filter)), col = ifelse(df4$Summed_box_filter >= 0, "green", "red"), border = NA, alpha = 0.4) 610 | title("Filtered RMS Sentiment with Price") 611 | mtext("Price / RMS Sentiment", side = 2, line = 2, cex = 0.8) 612 | axis(1, at = seq(1, nrow(df4), by = 30), labels = format(as.Date(df4$index)[seq(1, nrow(df4), by = 30)], "%b %d")) 613 | 614 | ``` 615 | 616 | ```{r} 617 | # Check for non-numeric values and convert to numeric 618 | df4[] <- lapply(df4, as.numeric) 619 | 620 | # Remove rows with missing data 621 | df4_complete <- df4[complete.cases(df4),] 622 | 623 | # Convert df4_complete to a numeric matrix 624 | df4_numeric <- as.matrix(df4_complete) 625 | 626 | # Compute the correlation matrix 627 | corr <- cor(df4_numeric) 628 | 629 | # Extract the correlation coefficient between "XRP_Price" and "Summed_box_filter" 630 | corr_coef <- corr[["XRP_Price", "Summed_box_filter"]] 631 | corr_coef 632 | ``` 633 | 634 | ```{r} 635 | # Assuming 'df4' is already available as a data frame in R 636 | 637 | # Load required packages 638 | library(ggplot2) 639 | library(dplyr) 640 | 641 | # Create a new column 'colors' based on the 'XRP_Vol' column values 642 | df4 <- df4 %>% 643 | mutate(colors = ifelse(lag(XRP_Vol, default = first(XRP_Vol)) < XRP_Vol, "g", "r")) 644 | 645 | # Create the main plot 646 | main_plot <- ggplot(df4, aes(x = Date)) + 647 | geom_line(aes(y = XRP_Price), color = "black", size = 0.5) + 648 | geom_area(aes(y = XRP_Price), fill = "blue", alpha = 0.4) + 649 | geom_line(aes(y = Summed_box_filter), color = "black", size = 0.5) + 650 | geom_area(aes(y = ifelse(Summed_box_filter >= 0, Summed_box_filter, 0)), fill = "green") + 651 | geom_area(aes(y = ifelse(Summed_box_filter <= 0, Summed_box_filter, 0)), fill = "red") + 652 | theme_void() + 653 | theme(plot.margin = margin(0, 0, 0, 0)) 654 | 655 | # Create the volume bar plot 656 | volume_plot <- ggplot(df4, aes(x = Date, y = XRP_Vol, fill = colors)) + 657 | geom_col() + 658 | scale_fill_manual(values = c("g" = "green", "r" = "red")) + 659 | theme_void() + 660 | theme(plot.margin = margin(0, 0, 0, 0)) 661 | 662 | # Combine the main plot and volume bar plot using cowplot 663 | library(cowplot) 664 | combined_plot <- plot_grid(main_plot, volume_plot, nrow = 2, rel_heights = c(3, 1)) 665 | 666 | # Display the combined plot 667 | print(combined_plot) 668 | 669 | 670 | 671 | ``` 672 | 673 | ```{r} 674 | rolling_average <- function(df) { 675 | a <- df 676 | c <- a$XRP_Price 677 | five <- a$XRP_Change 678 | five[1] <- 0 679 | ten <- five 680 | fifteen <- five 681 | twenty <- five 682 | thirty <- five 683 | 684 | for (i in 2:length(five)) { 685 | if (i < 5) { 686 | five[i] <- (c[i] - c[1]) / c[1] 687 | } else { 688 | five[i] <- (c[i] - c[i-4]) / c[i-4] 689 | } 690 | } 691 | 692 | for (i in 2:length(ten)) { 693 | if (i < 10) { 694 | ten[i] <- (c[i] - c[1]) / c[1] 695 | } else { 696 | ten[i] <- (c[i] - c[i-9]) / c[i-9] 697 | } 698 | } 699 | 700 | for (i in 2:length(fifteen)) { 701 | if (i < 15) { 702 | fifteen[i] <- (c[i] - c[1]) / c[1] 703 | } else { 704 | fifteen[i] <- (c[i] - c[i-14]) / c[i-14] 705 | } 706 | } 707 | 708 | for (i in 2:length(twenty)) { 709 | if (i < 20) { 710 | twenty[i] <- (c[i] - c[1]) / c[1] 711 | } else { 712 | twenty[i] <- (c[i] - c[i-19]) / c[i-19] 713 | } 714 | } 715 | 716 | for (i in 2:length(thirty)) { 717 | if (i < 30) { 718 | thirty[i] <- (c[i] - c[1]) / c[1] 719 | } else { 720 | thirty[i] <- (c[i] - c[i-29]) / c[i-29] 721 | } 722 | } 723 | 724 | data <- data.frame('five day percent change' = five, 'ten day percent change' = ten , 'fifteen day percent change' = fifteen, 'twenty day percent change' = twenty, 'thirty day percent change' = thirty, 'price' = a$XRP_Price) 725 | 726 | return(data) 727 | } 728 | 729 | 730 | 731 | ``` 732 | 733 | ```{r} 734 | data <- rolling_average(df4) 735 | head(data, 30) 736 | ``` 737 | 738 | ```{r} 739 | library(ggplot2) 740 | # Assuming your data frame is named "data" 741 | 742 | # Set the index as a separate column 743 | data$index <- seq_along(data$price) 744 | 745 | # Create a function to generate the plots 746 | generate_plot <- function(col_name) { 747 | ggplot(data, aes(x = index)) + 748 | geom_line(aes(y = price), color = "black") + 749 | geom_area(aes(y = price), fill = "blue", alpha = 0.4) + 750 | geom_line(aes(y = data[[col_name]]), color = "black") + 751 | geom_area(aes(y = pmax(data[[col_name]], 0)), fill = "green", alpha = 0.4) + 752 | geom_area(aes(y = pmin(data[[col_name]], 0)), fill = "red", alpha = 0.4) + 753 | labs(title = col_name, y = "Price / Price Percent Change") + 754 | theme_minimal() 755 | } 756 | 757 | # Generate the plots 758 | idx <- c("five.day.percent.change", "ten.day.percent.change", "fifteen.day.percent.change", 759 | "twenty.day.percent.change", "thirty.day.percent.change") 760 | 761 | for (i in idx) { 762 | print(generate_plot(i)) 763 | } 764 | 765 | 766 | ``` 767 | 768 | ```{r} 769 | 770 | library(ggplot2) 771 | library(ggcorrplot) 772 | 773 | # Remove rows and columns with missing values 774 | data_complete <- na.omit(data) 775 | 776 | # Compute the correlation matrix 777 | cor_matrix <- cor(data_complete) 778 | 779 | # Create the correlation heatmap with correlation coefficients 780 | ggcorrplot(cor_matrix, hc.order = TRUE, type = "lower", 781 | lab = TRUE, lab_size = 3, 782 | colors = c("green", "white", "pink"), 783 | title = "Correlation Heatmap", 784 | ggtheme = ggplot2::theme_minimal()) 785 | 786 | ``` 787 | 788 | ```{r} 789 | 790 | library(tidyr) 791 | 792 | library(dplyr) 793 | 794 | # Assuming 'data' and 'df3' are already available as data frames in R 795 | 796 | a <- data %>% 797 | mutate(row_index = row_number()) %>% 798 | select(row_index, "ten.day.percent.change", "thirty.day.percent.change") 799 | 800 | b <- df3 %>% 801 | mutate(row_index = row_number()) %>% 802 | full_join(a, by = "row_index") 803 | 804 | # Select only numeric columns 805 | b_numeric <- b %>% select_if(is.numeric) 806 | 807 | corr <- cor(b_numeric, use = "complete.obs", method = "pearson") 808 | filtered_corr <- corr[corr["ten.day.percent.change", ] > 0.3 | corr["thirty.day.percent.change", ] > 0.3, ] 809 | filtered_corr <- filtered_corr %>% as_tibble(rownames = "variable") %>% 810 | filter(variable == "ten.day.percent.change" | variable == "thirty.day.percent.change") %>% 811 | drop_na() 812 | 813 | filtered_corr 814 | 815 | ``` 816 | 817 | ```{r} 818 | library(dplyr) 819 | 820 | filtered_corr <- corr[corr["XRP_Price", ] > 0.3, c("XRP_Price", "thirty.day.percent.change")] 821 | 822 | filtered_corr 823 | 824 | ``` 825 | 826 | ```{r} 827 | library(dplyr) 828 | 829 | # Assuming 'b' is already available as a data frame in R 830 | 831 | bins_result <- cut(b$XRP_Price, breaks = 50, labels = FALSE, include.lowest = TRUE) 832 | bins <- attr(bins_result, "breaks") 833 | 834 | # Print bins 835 | cat("Bins:", "\n") 836 | print(bins) 837 | 838 | # Add the bins_result as a new column to the data frame 839 | b_with_bins <- b %>% mutate(XRP_Price_Bins = bins_result) 840 | 841 | # Print the first 30 elements of the binned data 842 | cat("Binned Data:", "\n") 843 | print(head(b_with_bins[, c("Date", "XRP_Price_Bins")], 30)) 844 | 845 | ``` 846 | 847 | ```{r} 848 | # Load the required libraries 849 | library(ggplot2) 850 | library(dplyr) 851 | 852 | # Assuming 'b_with_bins' is already available as a data frame in R 853 | 854 | # Create the ggplot object with the binned price (XRP_Price_Bins) and the Date 855 | p <- ggplot(b_with_bins, aes(x = Date)) + 856 | geom_line(aes(y = XRP_Price_Bins), color = "blue", size = 1.5) + 857 | labs(y = "Bin Number", title = "Binned Price Ranges") + 858 | theme_bw() + 859 | theme(plot.title = element_text(hjust = 0.5)) 860 | 861 | # Add the XRP_Price on a secondary axis 862 | p <- p + geom_line(aes(y = XRP_Price * 10), color = "red", linetype = "dashed", size = 1) + 863 | scale_y_continuous(sec.axis = sec_axis(~./10, name = "XRP Price")) 864 | 865 | # Display the plot 866 | print(p) 867 | 868 | ``` 869 | 870 | ```{r} 871 | # Assuming 'b_with_bins' is already available as a data frame in R 872 | 873 | # Create a new column 'binned_price' with the integer values of 'bins_result' 874 | b_with_bins$binned_price <- as.integer(bins_result) 875 | 876 | # Select only numeric columns 877 | numeric_columns <- sapply(b_with_bins, is.numeric) 878 | b_with_bins_numeric <- b_with_bins[, numeric_columns] 879 | 880 | # Calculate the correlation 881 | corr_matrix <- cor(b_with_bins_numeric, use = "complete.obs", method = "pearson") 882 | 883 | # Filter the correlation matrix for values greater than 0.3 884 | filtered_corr <- corr_matrix 885 | filtered_corr[filtered_corr <= 0.3] <- NA 886 | 887 | # Subset the correlation matrix to only include 'binned_price' and 'XRP_Price' columns 888 | filtered_corr <- subset(filtered_corr, select = c("binned_price", "XRP_Price")) 889 | 890 | # Drop rows with all NA values 891 | filtered_corr <- filtered_corr[!apply(is.na(filtered_corr), 1, all),] 892 | 893 | # Display the filtered correlation matrix 894 | print(filtered_corr) 895 | 896 | 897 | ``` 898 | 899 | ```{r} 900 | # Assuming 'b' is already available as a data frame in R 901 | 902 | # Save the DataFrame 'b' to a CSV file 903 | write.csv(b, file = "XRP_Data.csv", row.names = FALSE) 904 | 905 | ``` 906 | 907 | 908 | 909 | 910 | 911 | -------------------------------------------------------------------------------- /Code/EDA Final.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "CRYPTO PROJ" 3 | output: html_document 4 | date: "2023-04-10" 5 | --- 6 | 7 | ```{r setup, include=FALSE} 8 | knitr::opts_chunk$set(echo = TRUE) 9 | ``` 10 | 11 | ```{r} 12 | library(readxl) 13 | 14 | # Read the Excel file into a data frame 15 | crypto_df <- read_excel("/Users/ashleshkhajbage/Documents/CRYPTO Project/crypto_data.xlsx") 16 | 17 | 18 | # Convert the date column to a proper date format 19 | crypto_df$Date <- as.Date(crypto_df$Date, format = "%d/%m/%Y") 20 | 21 | head(crypto_df) 22 | ``` 23 | 24 | 25 | ## Checking datatypes,missing-values,duplicated-values,general-statitistics 26 | #DATA DICTIONARY 27 | #1.shape :--(1870,9) 28 | #2.discription of data 29 | #3.variable categorization :-numeric,categorical -- 30 | #4.redundant columns 31 | #5.missing value analysis 32 | #6.tables utilized for analysis 33 | #7.discrete and continuos variables 34 | ```{r} 35 | # Print the dimensions of the data frame 36 | cat("shape of data frame: ", dim(crypto_df), "\n") 37 | cat("*************************************\n") 38 | # Print the column names 39 | cat("columns/variables/features in datasets:\n") 40 | cat(names(crypto_df), "\n") 41 | cat("*************************************\n") 42 | 43 | # Print the numerical columns 44 | num_cols <- sapply(crypto_df, is.numeric) 45 | cat("Numerical columns in dataset:\n") 46 | cat(names(crypto_df[num_cols]), "\n") 47 | cat("*************************************\n") 48 | 49 | # Print the categorical columns 50 | cat_cols <- sapply(crypto_df, is.factor) 51 | cat_cols <- cat_cols | sapply(crypto_df, is.character) 52 | cat("Categorical columns in dataset:\n") 53 | cat(names(crypto_df[cat_cols]), "\n") 54 | 55 | ``` 56 | 57 | ```{r} 58 | str(crypto_df) 59 | 60 | ``` 61 | 62 | ```{r} 63 | crypto_df$Date <- as.Date(crypto_df$Date, format = "%d/%m/%Y") 64 | 65 | ``` 66 | 67 | ```{r} 68 | str(crypto_df) 69 | ``` 70 | 71 | 72 | ```{r} 73 | head(crypto_df) 74 | ``` 75 | 76 | ```{r} 77 | colSums(is.na(crypto_df)) 78 | 79 | #no missing values present 80 | ``` 81 | This will return a vector with the number of missing values in each column of the data frame. If the result shows all zeros, it means there are no missing values present in the data frame. If there are missing values, the corresponding columns will show non-zero values. 82 | 83 | ```{r} 84 | library(ggplot2) 85 | library(viridis) 86 | 87 | library(ggplot2) 88 | library(viridis) 89 | 90 | # Create a data frame of the missing values 91 | missing_df <- data.frame( 92 | Name = rep(unique(crypto_df$Name), each = ncol(crypto_df)), 93 | Symbol = rep(unique(crypto_df$Symbol), each = ncol(crypto_df)), 94 | x = rep(1:ncol(crypto_df), nrow(crypto_df)), 95 | y = rep(1:nrow(crypto_df), each = ncol(crypto_df)), 96 | value = as.vector(is.na(crypto_df)) 97 | ) 98 | 99 | # Create the heatmap using ggplot2 100 | ggplot(missing_df, aes(x, y, fill = value)) + 101 | geom_tile() + 102 | scale_fill_viridis_d(option = "A", na.value = "grey90") + 103 | facet_grid(rows = vars(Name), cols = vars(Symbol), scales = "free", space = "free") + 104 | theme_minimal() + 105 | labs(title = "Missing Values Heatmap") 106 | 107 | ``` 108 | 109 | ```{r} 110 | # Count duplicate rows in the crypto_df data frame 111 | sum(duplicated(crypto_df)) 112 | 113 | #no duplicate values is present in dataset 114 | ``` 115 | 116 | ```{r} 117 | # Generate summary statistics for the crypto_df data frame 118 | summary(crypto_df) 119 | 120 | #Date ranges from :----------->> 1st Jan 2017 to 31 Dec 2018 121 | 122 | #Name and Symbol variables have 10 unique values related to famous crypto-currencies based on market-captilization from 123 | #the period of 1st Jan 2021 to 6th July 2021 124 | 125 | #maximum value for high variable which represent Highest price on the given day in USD is around 65000 USD(~) which shows how volatile 126 | #crypto market is 127 | 128 | #similarly maximum value for lowest variable which represent Lowest price on given day in USD is also around 62000 USD. 129 | 130 | #So,by looking at the general statistics value one can relate and feel about volatility aspects of crypto markets 131 | ``` 132 | #### Data Wrangling 133 | 134 | Also, one thing we noticed -- market caps are quite huge. 135 | For ease of observing, let's introduce 2 new columns - market_billion_usd,volume_billion _usd which will represent currencies Market Cap in billion USD and Volume in billion USD 136 | ```{r} 137 | # load the dplyr package 138 | library(dplyr) 139 | 140 | # create the new columns 141 | crypto_df$market_billion_usd <- crypto_df$Marketcap / 1000000000 142 | crypto_df$volume_billion_usd <- crypto_df$Volume / 1000000000 143 | 144 | # remove the original columns 145 | crypto_df <- select(crypto_df, -Volume, -Marketcap) 146 | 147 | # print the updated dataframe 148 | head(crypto_df) 149 | 150 | ``` 151 | 152 | ```{r} 153 | crypto_df[188:196, ] 154 | ``` 155 | 156 | ```{r} 157 | unique(crypto_df$Name) 158 | 159 | ``` 160 | 161 | As crypto_df dataset has daily price data related to 10-cryptocurrencies so to analyze it in better way lets create subset of data and create dataframes related to each crytptocurrencies to analyze in better way 162 | 163 | ```{r} 164 | # create subsets for each cryptocurrency 165 | bitcoin_df <- subset(crypto_df, Name == "Bitcoin") 166 | ethereum_df <- subset(crypto_df, Name == "Ethereum") 167 | binance_df <- subset(crypto_df, Name == "Binance Coin") 168 | dogecoin_df <- subset(crypto_df, Name == "Dogecoin") 169 | cardano_df <- subset(crypto_df, Name == "Cardano") 170 | polkadot_df <- subset(crypto_df, Name == "Polkadot") 171 | solana_df <- subset(crypto_df, Name == "Solana") 172 | tether_df <- subset(crypto_df, Name == "Tether") 173 | xrp_df <- subset(crypto_df, Name == "XRP") 174 | usd_df <- subset(crypto_df, Name == "USD Coin") 175 | 176 | # create a list of all the dataframes 177 | list_df <- list(bitcoin_df, ethereum_df, binance_df, dogecoin_df, cardano_df, polkadot_df, solana_df, tether_df, xrp_df, usd_df) 178 | head(list_df[4], n = 2) 179 | 180 | ``` 181 | ```{r} 182 | write.csv(bitcoin_df, "/Users/ashleshkhajbage/Documents/Bitcoin.csv", row.names = FALSE) 183 | ``` 184 | 185 | ```{r} 186 | # create a vector of cryptocurrency names 187 | crypto_names <- c("Bitcoin", "Ethereum", "Binance Coin", "Dogecoin", "Cardano", "Polkadot", "Solana", "Tether", "XRP", "USD Coin") 188 | 189 | # loop through the list of dataframes and print their shape and head 190 | for (i in seq_along(list_df)) { 191 | cat("************************\n") 192 | cat(crypto_names[i], "---\n") 193 | data <- subset(crypto_df, Name == crypto_names[i]) 194 | cat("shape of data: ", dim(data), "\n") 195 | cat("data information: \n") 196 | # display the first 5 rows of the subset 197 | print(head(data,5)) 198 | cat("**************************\n") 199 | } 200 | 201 | ``` 202 | 203 | 204 | ## univariate analysis 205 | 206 | Univariate analysis and bivariate analysis are typically performed in the initial stages of data analysis, which is known as exploratory data analysis (EDA). 207 | 208 | Univariate analysis involves examining the distribution and summary statistics of individual variables, 209 | while bivariate analysis examines the relationship between two variables. 210 | 211 | These analyses can provide insights into the nature of the data and help to identify patterns or trends that may be of interest for further investigation. After EDA, more advanced statistical techniques such as multivariate analysis may be used to model the relationships between multiple variables. 212 | ```{r} 213 | library(ggplot2) 214 | library(gridExtra) 215 | 216 | # create a function to plot the histogram for a given cryptocurrency 217 | plot_histogram <- function(data, crypto_name) { 218 | binwidth <- diff(range(data$High)) / 30 219 | p1 <- ggplot(data, aes(x = High)) + 220 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 221 | ggtitle(crypto_name) + 222 | labs(x = "High", y = "Frequency") 223 | 224 | p2 <- ggplot(data, aes(x = High)) + 225 | geom_density(color = "red", fill = "salmon") + 226 | labs(x = "High", y = "Density") + 227 | theme_classic() 228 | 229 | return(grid.arrange(p1, p2, ncol = 1)) 230 | } 231 | 232 | # create a list of plots for each cryptocurrency 233 | plot_list <- lapply(list_df, function(data) { 234 | crypto_name <- unique(data$Name) 235 | plot_histogram(data, crypto_name) 236 | }) 237 | 238 | # combine the plots into a grid and display it 239 | grid.arrange(grobs = plot_list, ncol = 5, nrow =2) 240 | 241 | ``` 242 | 243 | ```{r} 244 | library(ggplot2) 245 | library(gridExtra) 246 | 247 | # create a list of box plot objects for each cryptocurrency 248 | boxplot_list <- lapply(list_df, function(data) { 249 | crypto_name <- unique(data$Name) 250 | p <- ggplot(data, aes(x = "", y = High)) + 251 | geom_boxplot(fill = "cornflowerblue") + 252 | ggtitle(crypto_name) + 253 | labs(x = "", y = "High") 254 | return(p) 255 | }) 256 | 257 | # combine the plots into a grid and display it 258 | grid.arrange(grobs = boxplot_list, ncol = 5, nrow = 2) 259 | 260 | 261 | ``` 262 | 263 | ```{r} 264 | library(moments) 265 | # print general statistics, skewness, and kurtosis for each cryptocurrency 266 | for (i in seq_along(list_df)) { 267 | crypto_name <- unique(list_df[[i]]$Name) 268 | print(crypto_name) 269 | print("general statistics for variable high") 270 | print(summary(list_df[[i]]$High)) 271 | print(paste("skewness of high:", round(skewness(list_df[[i]]$High), 3))) 272 | print(paste("kurtosis of variable high:", round(kurtosis(list_df[[i]]$High), 3))) 273 | print("*************************") 274 | } 275 | 276 | ``` 277 | 278 | ```{r} 279 | library(ggplot2) 280 | library(gridExtra) 281 | 282 | # create a function to plot the histogram for a given cryptocurrency 283 | plot_histogram <- function(data, crypto_name) { 284 | binwidth <- diff(range(data$Low)) / 30 285 | p1 <- ggplot(data, aes(x = Low)) + 286 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 287 | ggtitle(crypto_name) + 288 | labs(x = "Low", y = "Frequency") 289 | 290 | p2 <- ggplot(data, aes(x = Low)) + 291 | geom_density(color = "red", fill = "salmon") + 292 | labs(x = "Low", y = "Density") + 293 | theme_classic() 294 | 295 | return(grid.arrange(p1, p2, ncol = 1)) 296 | } 297 | 298 | # create a list of plots for each cryptocurrency 299 | plot_list <- lapply(list_df, function(data) { 300 | crypto_name <- unique(data$Name) 301 | plot_histogram(data, crypto_name) 302 | }) 303 | 304 | # combine the plots into a grid and display it 305 | grid.arrange(grobs = plot_list, ncol = 5, nrow =2) 306 | 307 | ``` 308 | 309 | ```{r} 310 | library(ggplot2) 311 | library(gridExtra) 312 | 313 | # create a list of box plot objects for each cryptocurrency 314 | boxplot_list <- lapply(list_df, function(data) { 315 | crypto_name <- unique(data$Name) 316 | p <- ggplot(data, aes(x = "", y = Low)) + 317 | geom_boxplot(fill = "cornflowerblue") + 318 | ggtitle(crypto_name) + 319 | labs(x = "", y = "Low") 320 | return(p) 321 | }) 322 | 323 | # combine the plots into a grid and display it 324 | grid.arrange(grobs = boxplot_list, ncol = 5, nrow = 2) 325 | 326 | ``` 327 | 328 | ```{r} 329 | # print general statistics, skewness, and kurtosis for each cryptocurrency 330 | for (i in seq_along(list_df)) { 331 | crypto_name <- unique(list_df[[i]]$Name) 332 | print(crypto_name) 333 | print("general statistics for variable Low") 334 | print(summary(list_df[[i]]$Low)) 335 | print(paste("skewness of Low:", round(skewness(list_df[[i]]$Low), 3))) 336 | print(paste("kurtosis of variable Low:", round(kurtosis(list_df[[i]]$Low), 3))) 337 | print("*************************") 338 | } 339 | ``` 340 | 341 | ```{r} 342 | library(ggplot2) 343 | library(gridExtra) 344 | 345 | # create a function to plot the histogram for a given cryptocurrency 346 | plot_histogram <- function(data, crypto_name) { 347 | binwidth <- diff(range(data$Open)) / 30 348 | p1 <- ggplot(data, aes(x = Open)) + 349 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 350 | ggtitle(crypto_name) + 351 | labs(x = "Open", y = "Frequency") 352 | 353 | p2 <- ggplot(data, aes(x = Open)) + 354 | geom_density(color = "red", fill = "salmon") + 355 | labs(x = "Open", y = "Density") + 356 | theme_classic() 357 | 358 | return(grid.arrange(p1, p2, ncol = 1)) 359 | } 360 | 361 | # create a list of plots for each cryptocurrency 362 | plot_list <- lapply(list_df, function(data) { 363 | crypto_name <- unique(data$Name) 364 | plot_histogram(data, crypto_name) 365 | }) 366 | 367 | # combine the plots into a grid and display it 368 | grid.arrange(grobs = plot_list, ncol = 5, nrow =2) 369 | 370 | ``` 371 | 372 | ```{r} 373 | library(ggplot2) 374 | library(gridExtra) 375 | 376 | # create a list of box plot objects for each cryptocurrency 377 | boxplot_list <- lapply(list_df, function(data) { 378 | crypto_name <- unique(data$Name) 379 | p <- ggplot(data, aes(x = "", y = Open)) + 380 | geom_boxplot(fill = "cornflowerblue") + 381 | ggtitle(crypto_name) + 382 | labs(x = "", y = "Open") 383 | return(p) 384 | }) 385 | 386 | # combine the plots into a grid and display it 387 | grid.arrange(grobs = boxplot_list, ncol = 5, nrow = 2) 388 | 389 | ``` 390 | 391 | ```{r} 392 | # print general statistics, skewness, and kurtosis for each cryptocurrency 393 | for (i in seq_along(list_df)) { 394 | crypto_name <- unique(list_df[[i]]$Name) 395 | print(crypto_name) 396 | print("general statistics for variable Open") 397 | print(summary(list_df[[i]]$Open)) 398 | print(paste("skewness of Open:", round(skewness(list_df[[i]]$Open), 3))) 399 | print(paste("kurtosis of variable Open:", round(kurtosis(list_df[[i]]$Open), 3))) 400 | print("*************************") 401 | } 402 | ``` 403 | 404 | 405 | ```{r} 406 | library(ggplot2) 407 | library(gridExtra) 408 | 409 | # create a function to plot the histogram for a given cryptocurrency 410 | plot_histogram <- function(data, crypto_name) { 411 | binwidth <- diff(range(data$Close)) / 30 412 | p1 <- ggplot(data, aes(x = Close)) + 413 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 414 | ggtitle(crypto_name) + 415 | labs(x = "Close", y = "Frequency") 416 | 417 | p2 <- ggplot(data, aes(x = Close)) + 418 | geom_density(color = "red", fill = "salmon") + 419 | labs(x = "Close", y = "Density") + 420 | theme_classic() 421 | 422 | return(grid.arrange(p1, p2, ncol = 1)) 423 | } 424 | 425 | # create a list of plots for each cryptocurrency 426 | plot_list <- lapply(list_df, function(data) { 427 | crypto_name <- unique(data$Name) 428 | plot_histogram(data, crypto_name) 429 | }) 430 | 431 | # combine the plots into a grid and display it 432 | grid.arrange(grobs = plot_list, ncol = 5, nrow =2) 433 | 434 | ``` 435 | 436 | ```{r} 437 | library(ggplot2) 438 | library(gridExtra) 439 | 440 | # create a list of box plot objects for each cryptocurrency 441 | boxplot_list <- lapply(list_df, function(data) { 442 | crypto_name <- unique(data$Name) 443 | p <- ggplot(data, aes(x = "", y = Close)) + 444 | geom_boxplot(fill = "cornflowerblue") + 445 | ggtitle(crypto_name) + 446 | labs(x = "", y = "Close") 447 | return(p) 448 | }) 449 | 450 | # combine the plots into a grid and display it 451 | grid.arrange(grobs = boxplot_list, ncol = 5, nrow = 2) 452 | 453 | ``` 454 | 455 | ```{r} 456 | # print general statistics, skewness, and kurtosis for each cryptocurrency 457 | for (i in seq_along(list_df)) { 458 | crypto_name <- unique(list_df[[i]]$Name) 459 | print(crypto_name) 460 | print("general statistics for variable Close") 461 | print(summary(list_df[[i]]$Close)) 462 | print(paste("skewness of Close:", round(skewness(list_df[[i]]$Close), 3))) 463 | print(paste("kurtosis of variable Close:", round(kurtosis(list_df[[i]]$Close), 3))) 464 | print("*************************") 465 | } 466 | ``` 467 | volume_billion_usd 468 | ```{r} 469 | library(ggplot2) 470 | library(gridExtra) 471 | 472 | # create a function to plot the histogram for a given cryptocurrency 473 | plot_histogram <- function(data, crypto_name) { 474 | binwidth <- diff(range(data$volume_billion_usd)) / 30 475 | p1 <- ggplot(data, aes(x = volume_billion_usd)) + 476 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 477 | ggtitle(crypto_name) + 478 | labs(x = "volume_billion_usd", y = "Frequency") 479 | 480 | p2 <- ggplot(data, aes(x = volume_billion_usd)) + 481 | geom_density(color = "red", fill = "salmon") + 482 | labs(x = "volume_billion_usd", y = "Density") + 483 | theme_classic() 484 | 485 | return(grid.arrange(p1, p2, ncol = 1)) 486 | } 487 | 488 | # create a list of plots for each cryptocurrency 489 | plot_list <- lapply(list_df, function(data) { 490 | crypto_name <- unique(data$Name) 491 | plot_histogram(data, crypto_name) 492 | }) 493 | 494 | # combine the plots into a grid and display it 495 | grid.arrange(grobs = plot_list, ncol = 5, nrow =2) 496 | 497 | ``` 498 | 499 | ```{r} 500 | library(ggplot2) 501 | library(gridExtra) 502 | 503 | # create a list of box plot objects for each cryptocurrency 504 | boxplot_list <- lapply(list_df, function(data) { 505 | crypto_name <- unique(data$Name) 506 | p <- ggplot(data, aes(x = "", y = volume_billion_usd)) + 507 | geom_boxplot(fill = "cornflowerblue") + 508 | ggtitle(crypto_name) + 509 | labs(x = "", y = "volume_billion_usd") 510 | return(p) 511 | }) 512 | 513 | # combine the plots into a grid and display it 514 | grid.arrange(grobs = boxplot_list, ncol = 5, nrow = 2) 515 | 516 | ``` 517 | 518 | 519 | ```{r} 520 | # print general statistics, skewness, and kurtosis for each cryptocurrency 521 | for (i in seq_along(list_df)) { 522 | crypto_name <- unique(list_df[[i]]$Name) 523 | print(crypto_name) 524 | print("general statistics for variable volume_billion_usd") 525 | print(summary(list_df[[i]]$volume_billion_usd)) 526 | print(paste("skewness of volume_billion_usd:", round(skewness(list_df[[i]]$volume_billion_usd), 3))) 527 | print(paste("kurtosis of variable volume_billion_usd:", round(kurtosis(list_df[[i]]$volume_billion_usd), 3))) 528 | print("*************************") 529 | } 530 | ``` 531 | 532 | market_billion_usd 533 | ```{r} 534 | library(ggplot2) 535 | library(gridExtra) 536 | 537 | # create a function to plot the histogram for a given cryptocurrency 538 | plot_histogram <- function(data, crypto_name) { 539 | binwidth <- diff(range(data$market_billion_usd)) / 30 540 | p1 <- ggplot(data, aes(x = market_billion_usd)) + 541 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 542 | ggtitle(crypto_name) + 543 | labs(x = "market_billion_usd", y = "Frequency") 544 | 545 | p2 <- ggplot(data, aes(x = market_billion_usd)) + 546 | geom_density(color = "red", fill = "salmon") + 547 | labs(x = "market_billion_usd", y = "Density") + 548 | theme_classic() 549 | 550 | return(grid.arrange(p1, p2, ncol = 1)) 551 | } 552 | 553 | # create a list of plots for each cryptocurrency 554 | plot_list <- lapply(list_df, function(data) { 555 | crypto_name <- unique(data$Name) 556 | plot_histogram(data, crypto_name) 557 | }) 558 | 559 | # combine the plots into a grid and display it 560 | grid.arrange(grobs = plot_list, ncol = 5, nrow =2) 561 | 562 | ``` 563 | 564 | ```{r} 565 | library(ggplot2) 566 | library(gridExtra) 567 | 568 | # create a list of box plot objects for each cryptocurrency 569 | boxplot_list <- lapply(list_df, function(data) { 570 | crypto_name <- unique(data$Name) 571 | p <- ggplot(data, aes(x = "", y = market_billion_usd)) + 572 | geom_boxplot(fill = "cornflowerblue") + 573 | ggtitle(crypto_name) + 574 | labs(x = "", y = "market_billion_usd") 575 | return(p) 576 | }) 577 | 578 | # combine the plots into a grid and display it 579 | grid.arrange(grobs = boxplot_list, ncol = 5, nrow = 2) 580 | 581 | ``` 582 | 583 | ```{r} 584 | # print general statistics, skewness, and kurtosis for each cryptocurrency 585 | for (i in seq_along(list_df)) { 586 | crypto_name <- unique(list_df[[i]]$Name) 587 | print(crypto_name) 588 | print("general statistics for variable market_billion_usd") 589 | print(summary(list_df[[i]]$market_billion_usd)) 590 | print(paste("skewness of market_billion_usd:", round(skewness(list_df[[i]]$market_billion_usd), 3))) 591 | print(paste("kurtosis of variable market_billion_usd:", round(kurtosis(list_df[[i]]$market_billion_usd), 3))) 592 | print("*************************") 593 | } 594 | ``` 595 | 596 | # Bivariate analysis 597 | #price-trend of cryptocurrencies over past 6months from jan-2021 to july-2021 598 | # #close price trends ---for all 10 coins : 599 | #we plot the closing price (adjusted) of the cryptos over the period of past 6 months 600 | #to get a general idea of how the cryptocurrencies performed in the given period. 601 | ```{r} 602 | library(ggplot2) 603 | library(gridExtra) 604 | 605 | # create a function to plot the closing price trend for a given cryptocurrency 606 | plot_price_trend <- function(data, crypto_name) { 607 | p <- ggplot(data, aes(x = Date, y = Close)) + 608 | geom_line(color = "cornflowerblue") + 609 | ggtitle(crypto_name) + 610 | labs(x = "", y = "Closing Price") 611 | return(p) 612 | } 613 | 614 | # create a list of line plot objects for each cryptocurrency 615 | price_trend_list <- lapply(list_df, function(data) { 616 | crypto_name <- unique(data$Name) 617 | data$Date <- as.Date(data$Date, "%d-%m-%Y") 618 | plot_price_trend(data, crypto_name) 619 | }) 620 | 621 | # combine the plots into a grid and display it 622 | grid.arrange(grobs = price_trend_list, ncol = 4, nrow = 3) 623 | 624 | ``` 625 | 626 | 627 | ```{r} 628 | #VOLUME VS DATE 629 | library(ggplot2) 630 | library(gridExtra) 631 | 632 | # create a function to plot the closing price trend for a given cryptocurrency 633 | plot_price_trend <- function(data, crypto_name) { 634 | p <- ggplot(data, aes(x = Date, y = volume_billion_usd)) + 635 | geom_line(color = "cornflowerblue") + 636 | ggtitle(crypto_name) + 637 | labs(x = "", y = "Volume Billion USD") 638 | return(p) 639 | } 640 | 641 | # create a list of line plot objects for each cryptocurrency 642 | price_trend_list <- lapply(list_df, function(data) { 643 | crypto_name <- unique(data$Name) 644 | data$Date <- as.Date(data$Date, "%d-%m-%Y") 645 | plot_price_trend(data, crypto_name) 646 | }) 647 | 648 | # combine the plots into a grid and display it 649 | grid.arrange(grobs = price_trend_list, ncol = 4, nrow = 3) 650 | 651 | ``` 652 | 653 | ### Day-to-day percentage change(Daily returns) 654 | 4. Day-to-day percentage change(Daily returns) 655 | Daily percentage change in the price of the crypto is calculated on the basis of percentage change between 2 consecutive days’ closing prices.Let’s say if the closing price of the stock yesterday was ₹700 and today the stock closed as ₹750. So, the percentage change is 7.14%. i.e. ((750–700) / 700)*100. 656 | Accordingly, we’ll introduce a new column ‘Day_Pct%_Change’ denoting the daily returns in the price of the crypto. 657 | 658 | ```{r} 659 | 660 | # calculate and print the percentage change in the "Close" column of each cryptocurrency's dataframe 661 | for (i in seq_along(list_df)) { 662 | crypto_name <- unique(list_df[[i]]$Name) 663 | data <- list_df[[i]] 664 | data$Day_Pct_Change <- diff(data$Close) / lag(data$Close, default = data$Close[1]) * 100 665 | list_df[[i]]$Day_Pct_Change <- data$Day_Pct_Change 666 | print(head(data, 5)) 667 | } 668 | 669 | ``` 670 | 671 | ### Representing daily returns in form of a plot for 187 days— 672 | ### bitcoin ----day pct change --- 673 | ```{r} 674 | library(ggplot2) 675 | library(gridExtra) 676 | 677 | # create a function to plot the closing price trend for a given cryptocurrency 678 | plot_price_trend <- function(data, crypto_name) { 679 | p <- ggplot(data, aes(x = Date, y = data$Day_Pct_Change)) + 680 | geom_line(color = "cornflowerblue") + 681 | ggtitle(crypto_name) + 682 | labs(x = "", y = "Day_Pct_Change") 683 | return(p) 684 | } 685 | 686 | # create a list of line plot objects for each cryptocurrency 687 | price_trend_list <- lapply(list_df, function(data) { 688 | crypto_name <- unique(data$Name) 689 | data$Date <- as.Date(data$Date, "%d-%m-%Y") 690 | plot_price_trend(data, crypto_name) 691 | }) 692 | 693 | # combine the plots into a grid and display it 694 | grid.arrange(grobs = price_trend_list, ncol = 4, nrow = 3) 695 | 696 | ``` 697 | ### Plotting daily returns distribution histogram — 698 | 699 | Inferences- 700 | # #satistics 701 | # bitcoin_df["Day_Pct%_Change"].describe() 702 | 703 | #1.The daily returns histogram is centered about origin. 704 | #2.for the past 6 months, the mean daily returns has been about 0.200248 705 | #3.for most of the days we have daily returns less than 2% 706 | #4.max percentage change value is 18% and min percentage change value is -13% in past 6 months bitcoin data 707 | #5. 708 | 709 | ```{r} 710 | library(ggplot2) 711 | library(gridExtra) 712 | 713 | # create a function to plot the histogram for a given cryptocurrency 714 | plot_histogram <- function(data, crypto_name) { 715 | binwidth <- diff(range(data$Day_Pct_Change)) / 30 716 | p1 <- ggplot(data, aes(x = Day_Pct_Change)) + 717 | geom_histogram(binwidth = binwidth, color = "white", fill = "cornflowerblue") + 718 | ggtitle(crypto_name) + 719 | labs(x = "Day_Pct_Change", y = "Frequency") 720 | 721 | p2 <- ggplot(data, aes(x = Day_Pct_Change)) + 722 | geom_density(color = "red", fill = "salmon") + 723 | labs(x = "Day_Pct_Change", y = "Density") + 724 | theme_classic() 725 | 726 | return(grid.arrange(p1, p2, ncol = 1)) 727 | } 728 | 729 | # create a list of plots for each cryptocurrency 730 | plot_list <- lapply(list_df, function(data) { 731 | crypto_name <- unique(data$Name) 732 | plot_histogram(data, crypto_name) 733 | }) 734 | 735 | # combine the plots into a grid and display it 736 | grid.arrange(grobs = plot_list, ncol = 4, nrow =3) 737 | 738 | ``` 739 | 740 | ```{r} 741 | # print general statistics, skewness, and kurtosis for each cryptocurrency 742 | for (i in seq_along(list_df)) { 743 | crypto_name <- unique(list_df[[i]]$Name) 744 | print(crypto_name) 745 | print("general statistics for variable Day_Pct_Change") 746 | print(summary(list_df[[i]]$Day_Pct_Change)) 747 | print(paste("skewness of Day_Pct_Change:", round(skewness(list_df[[i]]$Day_Pct_Change), 3))) 748 | print(paste("kurtosis of variable Day_Pct_Change:", round(kurtosis(list_df[[i]]$Day_Pct_Change), 3))) 749 | print("*************************") 750 | } 751 | ``` 752 | 753 | ```{r} 754 | # create an empty list to store the summary dataframes for each cryptocurrency 755 | data_df <- list() 756 | 757 | # loop through each cryptocurrency's dataframe and compute the summary data 758 | for (i in seq_along(list_df)) { 759 | crypto_name <- unique(list_df[[i]]$Name) 760 | data <- list_df[[i]] 761 | new_df <- data[which.max(data$Day_Pct_Change), ] 762 | data_df[[i]] <- new_df 763 | } 764 | 765 | # concatenate the summary dataframes into a single dataframe and sort by Day_Pct_Change 766 | new_df <- do.call(rbind, data_df) 767 | new_df <- new_df[order(new_df$Day_Pct_Change, decreasing = TRUE), ] 768 | row.names(new_df) <- NULL 769 | new_df 770 | 771 | ``` 772 | 773 | ```{r} 774 | crypto_df 775 | ``` 776 | 777 | ### TREND ANALYSIS 778 | # 5. Trend Analysis 779 | # Next we add a new column ‘Trend’ whose values are based on the day-to-day percentage change we calculated above. 780 | # Trend is determined from below relationship — 781 | 782 | 783 | Trend analysis is typically a part of time series analysis, which is a subfield of statistics and data analysis that deals with analyzing and interpreting data collected over time. 784 | Time series analysis can involve both univariate and multivariate analysis, depending on whether one or multiple variables are being analyzed over time. Trend analysis specifically focuses on identifying and characterizing patterns and trends in time series data, such as long-term increasing or decreasing trends, periodic fluctuations, and seasonal effects. 785 | 786 | ```{r} 787 | 788 | get_trend <- function(x) { 789 | if (x > -0.5 & x <= 0.5) { 790 | return("Slight or No change") 791 | } else if (x > 0.5 & x <= 1) { 792 | return("Slight Positive") 793 | } else if (x > -1 & x <= -0.5) { 794 | return("Slight Negative") 795 | } else if (x > 1 & x <= 3) { 796 | return("Positive") 797 | } else if (x > -3 & x <= -1) { 798 | return("Negative") 799 | } else if (x > 3 & x <= 7) { 800 | return("Among top gainers") 801 | } else if (x > -7 & x <= -3) { 802 | return("Among top losers") 803 | } else if (x > 7) { 804 | return("Bull run") 805 | } else if (x <= -7) { 806 | return("Bear drop") 807 | } 808 | } 809 | 810 | for (i in seq_along(list_df)) { 811 | data <- list_df[[i]] 812 | data$Trend <- sapply(data$Day_Pct_Change, get_trend) 813 | list_df[[i]]$Trend <- data$Trend 814 | print(head(data, 5)) 815 | } 816 | 817 | ``` 818 | 819 | We wish to see how the cryptocurrencies were trending in past 6months from 1st July 2017 to 7th july 2018 (change dates) 820 | This can be visualized as a pie chart, with each sector representing the percentage of days each trend occurred. 821 | We’ll plot a pie chart for the ‘Trend’ column to visualize the relative frequency of each trend category. For this, 822 | we’ll use the groupby() function with the trend column to aggregate all days with the same trend into a single group before plotting the pie chart. 823 | 824 | ### Visualizing Trend Frequency with Pie-Chart — 825 | 826 | 827 | ```{r} 828 | library(ggplot2) 829 | 830 | # define a function to plot the pie chart for a given cryptocurrency 831 | plot_pie_chart <- function(data, crypto_name) { 832 | pie_data <- data %>% 833 | group_by(Trend) %>% 834 | summarize(count = n()) %>% 835 | mutate(percentage = count/sum(count) * 100) 836 | 837 | p <- ggplot(pie_data, aes(x = "", y = percentage, fill = Trend)) + 838 | geom_bar(width = 1, stat = "identity") + 839 | coord_polar("y", start = 0) + 840 | scale_fill_brewer(palette = "Set2") + 841 | ggtitle(crypto_name) + 842 | theme_void() + 843 | geom_text(aes(label = paste0(round(percentage), "%")), position = position_stack(vjust = 0.5)) 844 | 845 | return(p) 846 | } 847 | 848 | # create a list of pie chart objects for each cryptocurrency 849 | pie_chart_list <- lapply(list_df, function(data) { 850 | crypto_name <- unique(data$Name) 851 | plot_pie_chart(data, crypto_name) 852 | }) 853 | 854 | # display each pie chart separately 855 | for (i in seq_along(pie_chart_list)) { 856 | print(pie_chart_list[[i]]) 857 | } 858 | 859 | ``` 860 | ### heatmap to visualize the frequency of trends for different cryptocurrencies. 861 | 862 | ```{r} 863 | library(ggplot2) 864 | 865 | # create a function to plot the heatmap for a given cryptocurrency 866 | plot_heatmap <- function(data, crypto_name) { 867 | # calculate frequency of each trend 868 | trend_freq <- table(data$Trend) 869 | # create a dataframe with trend and frequency columns 870 | trend_df <- data.frame(Trend = names(trend_freq), Frequency = as.numeric(trend_freq)) 871 | # create heatmap 872 | p <- ggplot(trend_df, aes(x = Trend, y = crypto_name, fill = Frequency)) + 873 | geom_tile() + 874 | scale_fill_gradient(low = "white", high = "steelblue") + 875 | labs(title = crypto_name, x = "Trend", y = "") + 876 | theme(axis.text.x = element_text(angle = 90, hjust = 1)) 877 | 878 | return(p) 879 | } 880 | 881 | # create a list of heatmap objects for each cryptocurrency 882 | heatmap_list <- lapply(list_df, function(data) { 883 | crypto_name <- unique(data$Name) 884 | plot_heatmap(data, crypto_name) 885 | }) 886 | 887 | # display each heatmap separately 888 | for (i in seq_along(heatmap_list)) { 889 | print(heatmap_list[[i]]) 890 | } 891 | 892 | ``` 893 | 894 | ### Daily Returns and Volume 895 | 896 | ```{r} 897 | library(tidyverse) 898 | library(ggpubr) 899 | 900 | # Define function to calculate and annotate correlation coefficient and p-value 901 | calc_corr <- function(x, y) { 902 | corr <- cor.test(x, y) 903 | corr_text <- sprintf("r = %.2f, p = %.2e", corr$estimate, corr$p.value) 904 | annotate("text", x = Inf, y = Inf, label = corr_text, hjust = 1.2, vjust = 1.2, size = 5) 905 | } 906 | 907 | # Create a new list containing the Date, Day_Pct_Change, and Volume_(24h) columns for each cryptocurrency 908 | data_list <- lapply(list_df, function(df) { 909 | df[, c("Date", "Day_Pct_Change", "volume_billion_usd")] 910 | }) 911 | 912 | # Create a new data frame containing the correlation coefficients and p-values for each cryptocurrency 913 | corr_df <- data.frame(Cryptocurrency = character(), 914 | Correlation = double(), 915 | P_Value = double(), 916 | stringsAsFactors = FALSE 917 | ) 918 | 919 | # Loop through list of data frames and calculate correlation coefficients and p-values 920 | for (i in seq_along(data_list)) { 921 | corr <- cor.test(data_list[[i]]$Day_Pct_Change, data_list[[i]]$volume_billion_usd) 922 | corr_df[i, "Cryptocurrency"] <- names(data_list)[i] 923 | corr_df[i, "Correlation"] <- corr$estimate 924 | corr_df[i, "P_Value"] <- corr$p.value 925 | } 926 | 927 | # Create scatter plot with trend line and correlation coefficient/p-value annotation for each cryptocurrency 928 | scatter_plots <- list() 929 | for (i in seq_along(data_list)) { 930 | scatter_plot <- ggplot(data_list[[i]], aes(x = Day_Pct_Change, y = volume_billion_usd)) + 931 | geom_point(alpha = 0.7) + 932 | geom_smooth(method = "lm", se = FALSE, color = "red") + 933 | labs(title = names(data_list)[i], x = "Daily Percentage Change", y = "Volume (24h)") + 934 | theme_pubclean() + 935 | theme(plot.title = element_text(size = 14, face = "bold")) + 936 | calc_corr(data_list[[i]]$Day_Pct_Change, data_list[[i]]$volume_billion_usd) 937 | scatter_plots[[i]] <- scatter_plot 938 | } 939 | 940 | # Arrange scatter plots into a grid and display 941 | scatter_grid <- plot_grid(plotlist = scatter_plots, ncol = 3) 942 | scatter_grid 943 | 944 | ``` 945 | 946 | 947 | 948 | 949 | ```{r} 950 | library(forecast) 951 | 952 | # Create an empty list to store the results 953 | forecast_list <- list() 954 | 955 | # Loop over each cryptocurrency dataframe in the list 956 | for (i in seq_along(list_df)) { 957 | # Extract the time series data 958 | ts_data <- ts(list_df[[i]]$XRP_Price, frequency = 7) 959 | # Fit the ARIMA model 960 | arima_fit <- auto.arima(ts_data) 961 | # Forecast the next 5 days 962 | forecast_data <- forecast(arima_fit, h = 5) 963 | # Store the forecast results in the list 964 | forecast_list[[i]] <- forecast_data 965 | } 966 | 967 | # Print the forecast results for each cryptocurrency 968 | for (i in seq_along(forecast_list)) { 969 | cat(paste0("Cryptocurrency ", i, ":\n")) 970 | print(forecast_list[[i]]) 971 | cat("\n") 972 | } 973 | 974 | ``` 975 | 976 | #### Top 10 cryptocurrencies in 2021 date range from 1st jan 2021 to 6th july 2021 977 | 978 | ```{r} 979 | library(tidyverse) 980 | 981 | # Assuming your data is in a dataframe called `crypto_df` 982 | grouped_data <- crypto_df %>% 983 | group_by(Name) %>% 984 | summarise(market_billion_usd = last(market_billion_usd)) %>% 985 | top_n(10, market_billion_usd) %>% 986 | arrange(desc(market_billion_usd)) 987 | 988 | # Creating the bar chart 989 | ggplot(grouped_data, aes(x = market_billion_usd, y = reorder(Name, market_billion_usd))) + 990 | geom_col(fill = "skyblue", alpha = 0.8) + 991 | labs(x = "Market cap (in billion USD)", y = "", title = "Top 10 Currencies by Market Cap") + 992 | theme_minimal() 993 | 994 | ``` 995 | 996 | 997 | ```{r} 998 | grouped_data 999 | ``` 1000 | ```{r} 1001 | # Assuming your data is in a dataframe called `crypto_df` 1002 | grouped_data <- crypto_df %>% 1003 | group_by(Name) %>% 1004 | summarise(volume_billion_usd = last(volume_billion_usd)) %>% 1005 | top_n(10, volume_billion_usd) %>% 1006 | arrange(desc(volume_billion_usd)) 1007 | 1008 | # Creating the bar chart 1009 | ggplot(grouped_data, aes(x = volume_billion_usd, y = reorder(Name, volume_billion_usd))) + 1010 | geom_col(fill = "skyblue", alpha = 0.8) + 1011 | labs(x = "Volume (in billion USD)", y = "", title = "Top 10 Currencies by Market Cap") + 1012 | theme_minimal() 1013 | ``` 1014 | ### Monthly end closing prices for all 10 cryptocurrencies 1015 | 1016 | ```{r} 1017 | # Load necessary libraries 1018 | library(xts) 1019 | library(ggplot2) 1020 | library(gridExtra) 1021 | 1022 | # Define function to create joint probability plots 1023 | create_timeplot <- function(data, crypto_name) { 1024 | # Convert to xts object 1025 | xts_obj <- xts(data$Close, order.by = data$Date) 1026 | 1027 | # Plot using ggplot2 1028 | ggplot() + geom_line(data = xts_obj, aes(x = index(xts_obj), y = coredata(xts_obj)), color = "blue") + 1029 | geom_vline(xintercept = as.numeric(as.Date(paste(format(index(xts_obj)[endpoints(xts_obj, on = "months")]), "01")) - 1), 1030 | linetype = "dashed", color = "red") + 1031 | labs(title = paste("Closing Price for ",crypto_name), x = "Date", y = "Closing Price") 1032 | } 1033 | 1034 | # Define function to loop over list of data frames and create joint probability plots 1035 | create_timeplots <- function(list_df, crypto_names) { 1036 | plots <- list() 1037 | for (i in seq_along(list_df)) { 1038 | data <- list_df[[i]] 1039 | crypto_name <- crypto_names[i] 1040 | plots[[i]] <- create_timeplot(data, crypto_name) 1041 | } 1042 | return(plots) 1043 | } 1044 | 1045 | # Call function to create joint probability plots and store in a list 1046 | plots <- create_timeplots(list_df, crypto_names) 1047 | 1048 | grid_plot <- grid.arrange(grobs = plots, ncol = 3) # Adjust 'ncol' to change the number of columns 1049 | 1050 | # Print the grid 1051 | print(grid_plot) 1052 | 1053 | ``` 1054 | 1055 | 1056 | ```{r} 1057 | # Load necessary libraries 1058 | library(xts) 1059 | library(ggplot2) 1060 | 1061 | # Define function to create time series plots 1062 | create_timeplot <- function(data, crypto_name) { 1063 | # Convert to xts object 1064 | xts_obj <- xts(data$Close, order.by = data$Date) 1065 | 1066 | # Get weekly endpoint indices and values 1067 | weekly_endpoints <- endpoints(xts_obj, on = "weeks") 1068 | weekly_values <- coredata(xts_obj)[weekly_endpoints] 1069 | 1070 | # Plot using ggplot2 1071 | ggplot() + 1072 | geom_line(data = xts_obj, aes(x = index(xts_obj), y = coredata(xts_obj)), color = "blue") + 1073 | geom_point(data = data.frame(date = index(xts_obj)[weekly_endpoints], value = weekly_values), 1074 | aes(x = date, y = value), color = "red", size = 2) + 1075 | geom_vline(xintercept = as.numeric(as.Date(paste(format(index(xts_obj)[endpoints(xts_obj, on = "months")]), "01")) - 1), 1076 | linetype = "dashed", color = "red") + 1077 | labs(title = paste("Closing Price for ",crypto_name), 1078 | x = "Date", y = "Closing Price") 1079 | } 1080 | 1081 | # Define function to loop over list of data frames and create time series plots 1082 | create_timeplots <- function(list_df, crypto_names) { 1083 | plots <- list() 1084 | for (i in seq_along(list_df)) { 1085 | data <- list_df[[i]] 1086 | crypto_name <- crypto_names[i] 1087 | plots[[i]] <- create_timeplot(data, crypto_name) 1088 | } 1089 | return(plots) 1090 | } 1091 | 1092 | # Call function to create time series plots and store in a list 1093 | plots <- create_timeplots(list_df, crypto_names) 1094 | 1095 | # Arrange plots in a grid 1096 | for (plot in plots) { 1097 | print(plot) 1098 | } 1099 | ``` 1100 | 1101 | 1102 | 1103 | ### Experiment 1104 | 1105 | ```{r} 1106 | calc_earnings <- function(currency_name, df) { 1107 | # Displaying stats for currency_name 1108 | # print(paste("Displaying stats for", currency_name)) 1109 | 1110 | closing_prices <- df %>% 1111 | filter(Name == currency_name & !is.na(Close)) %>% 1112 | select(Date, Close) 1113 | 1114 | # Num. currency purchased for 1000$ 1115 | # print(paste("Closing price at the beginning:", closing_prices[1, "Close"])) 1116 | num_units_purchased <- 1000 / closing_prices[1, "Close"] 1117 | 1118 | # print(paste("Num. units purchased:", num_units_purchased)) 1119 | # Current value 1120 | last_price <- tail(closing_prices$Close, n = 1) 1121 | # print(paste("Last price:", last_price)) 1122 | amount_earned <- (num_units_purchased * last_price) - 1000 1123 | # print(paste("Amount you would have earned:", amount_earned, "$")) 1124 | return(amount_earned) 1125 | } 1126 | ``` 1127 | ```{r} 1128 | crypto_names 1129 | ``` 1130 | ```{r} 1131 | top_10_currencies_earnings <- data.frame() 1132 | 1133 | for (currency in crypto_names) { 1134 | earnings <- calc_earnings(currency, crypto_df) 1135 | df <- data.frame(Name = currency, Earnings = earnings) 1136 | top_10_currencies_earnings <- rbind(top_10_currencies_earnings, df) 1137 | } 1138 | colnames(top_10_currencies_earnings) <- c("Name", "Earnings") 1139 | top_10_currencies_earnings 1140 | ``` 1141 | 1142 | ```{r} 1143 | # Sort the data frame in descending order of Earnings 1144 | top_10_currencies_earnings <- top_10_currencies_earnings %>% 1145 | arrange(desc(Earnings)) 1146 | top_10_currencies_earnings 1147 | ``` 1148 | 1149 | ```{r} 1150 | library(dplyr) 1151 | library(ggplot2) 1152 | 1153 | # Reorder the levels of Name based on Earnings 1154 | top_10_currencies_earnings$Name <- factor(top_10_currencies_earnings$Name, levels = top_10_currencies_earnings$Name) 1155 | 1156 | # Create the bar plot 1157 | ggplot(top_10_currencies_earnings, aes(x = Name, y = Earnings)) + 1158 | geom_bar(stat = "identity", fill = "steelblue") + 1159 | theme_bw() + 1160 | labs(x = "Currency", y = "Earnings") + 1161 | geom_text(aes(label=paste0("$",format(round(Earnings), nsmall=0))), 1162 | vjust=1.5, 1163 | size=3.5) 1164 | 1165 | ``` 1166 | 1167 | #### heatmap -correlation analysis 1168 | 1169 | ```{r} 1170 | # Load necessary libraries 1171 | library(tidyverse) 1172 | library(reshape2) 1173 | 1174 | # Example data (replace with your actual data) 1175 | # crypto_df <- data.frame( 1176 | # Date = as.Date(rep(seq(from = as.Date("2021-01-01"), to = as.Date("2021-01-10"), by = "day"), 10)), 1177 | # Name = rep(c("Binance Coin", "Bitcoin", "Cardano", "Dogecoin", "Ethereum", "Polkadot", "Solana", "Tether", "USD Coin", "XRP"), each = 10), 1178 | # Close = rnorm(100, mean = 100, sd = 10) 1179 | # ) 1180 | 1181 | # Create cross-tabulated data frame 1182 | cross_tab_crypto <- dcast(crypto_df, Date ~ Name, value.var = "Close", fun.aggregate = sum) 1183 | 1184 | # Calculate correlations 1185 | correlations <- cor(cross_tab_crypto[, -1], use = "complete.obs") 1186 | 1187 | # Plot correlation matrix 1188 | library(corrplot) 1189 | corrplot(correlations, method = "circle") 1190 | 1191 | ``` 1192 | 1193 | ```{r} 1194 | library(ggplot2) 1195 | library(reshape2) 1196 | library(viridis) 1197 | 1198 | # Create cross-tabulated data frame 1199 | cross_tab_crypto <- dcast(crypto_df, Date ~ Name, value.var = "Close", fun.aggregate = sum) 1200 | 1201 | # Calculate correlations 1202 | correlations <- cor(cross_tab_crypto[, -1], use = "complete.obs") 1203 | 1204 | # Melt correlation matrix into long format 1205 | melted_cor_matrix <- melt(correlations) 1206 | 1207 | # Create heatmap 1208 | ggplot(melted_cor_matrix, aes(x = Var1, y = Var2, fill = value)) + 1209 | geom_tile() + 1210 | scale_fill_gradientn(name = "Correlation", colours = viridis(100), na.value = "white") + 1211 | labs(x = "", y = "") + 1212 | theme_minimal() + 1213 | theme(axis.text.x = element_text(angle = 90, vjust = 0.5), 1214 | axis.text.y = element_text(angle = 0, hjust = 0.5)) + 1215 | geom_text(aes(label = round(value, 2)), color = "white", size = 3) + 1216 | coord_fixed() 1217 | 1218 | ``` 1219 | 1220 | The plot shows a heatmap of the correlation matrix between the different cryptocurrency prices over time. Each cell in the heatmap represents the correlation coefficient between two cryptocurrency prices, where a higher correlation coefficient indicates a stronger positive correlation and a lower correlation coefficient indicates a weaker or negative correlation. 1221 | 1222 | By looking at the plot, we can make the following observations: 1223 | 1224 | There is a strong positive correlation between the prices of Bitcoin and most other cryptocurrencies, such as Ethereum, USD Coin, and Tether. This suggests that changes in the price of Bitcoin are likely to have a similar effect on the prices of these cryptocurrencies. 1225 | 1226 | Some cryptocurrencies have weak or negative correlations with each other. For example, the prices of Solana and Cardano have a weak positive correlation, while the prices of Polkadot and Dogecoin have a weak negative correlation. This suggests that changes in the price of one cryptocurrency may not have a significant impact on the prices of these other cryptocurrencies. 1227 | 1228 | There are some cryptocurrencies that have strong positive correlations with each other, but weaker correlations with other cryptocurrencies. For example, the prices of Binance Coin and XRP have a strong positive correlation, but weaker correlations with other cryptocurrencies. This suggests that these cryptocurrencies may be more closely related to each other than to other cryptocurrencies. 1229 | 1230 | Overall, this plot provides a useful visualization of the correlation structure between cryptocurrency prices, which can help us to better understand the relationships between different cryptocurrencies and make informed investment decisions. 1231 | 1232 | ```{r} 1233 | # Load necessary libraries 1234 | library(dplyr) 1235 | library(tidyquant) 1236 | library(ggplot2) 1237 | library(GGally) 1238 | 1239 | # Example data (replace with your data) 1240 | cross_tab_crypto <- data.frame( 1241 | BITCOIN = list_df[[1]]$Close, 1242 | CARDANO = list_df[[2]]$Close, 1243 | ETHEREUM = list_df[[4]]$Close, 1244 | XRP = list_df[[9]]$Close 1245 | ) 1246 | 1247 | # Calculate daily returns 1248 | pct_chg_df <- cross_tab_crypto %>% 1249 | mutate_all(funs((. / lag(.) - 1) * 100)) %>% 1250 | na.omit() 1251 | 1252 | # Create pairplot 1253 | ggpairs(pct_chg_df) 1254 | 1255 | ``` 1256 | 1257 | 1258 | 1259 | ```{r} 1260 | # Load necessary libraries 1261 | library(tidyverse) 1262 | library(reshape2) 1263 | 1264 | # Create cross-tabulated data frame 1265 | cross_tab_crypto <- dcast(crypto_df, Date ~ Name, value.var = "Close", fun.aggregate = sum) 1266 | 1267 | pct_chg_df <- cross_tab_crypto %>% 1268 | mutate(across(-Date, ~(lag(.)/. - 1) * 100)) %>% 1269 | na.omit() 1270 | 1271 | # Create pairplot 1272 | ggpairs(pct_chg_df) 1273 | 1274 | ``` 1275 | 1276 | # Although the pair plots provide very good 1277 | # visualization of all possible combinations between the bunch of cryptos, 1278 | # it doesn’t provide any detailed information like Pearson’s R value or null-hypothesis p value to quantify the correlation. 1279 | # That’s where the joint plot comes into the picture! 1280 | # While Pair plot provides a visual insight into all possible correlations, Seaborn jointplot provides detailed information like Pearson’s R value 1281 | # (Pearson’s correlation coefficient) for each pair of cryptos. Pearson’s R value ranges from -1 to 1. Negative value indicates a negative linear 1282 | # relation between the variables, while positive value indicates a positive relationship. Pearson’s R value closer to 1 (or -1) indicates strong correlation, 1283 | # while value closer to 0 indicates weak correlation. 1284 | # In addition to Pearson’s R value, joint plot also shows the respective histograms on the edges as well as null hypothesis p-value. 1285 | 1286 | ```{r} 1287 | pct_chg_df 1288 | ``` 1289 | 1290 | 1291 | ```{r} 1292 | # Load necessary libraries 1293 | library(tidyverse) 1294 | library(ggpubr) 1295 | 1296 | 1297 | # Create cross-tabulated data frame 1298 | cross_tab_crypto <- dcast(crypto_df, Date ~ Name, value.var = "Close", fun.aggregate = sum) 1299 | 1300 | # Calculate correlations 1301 | correlations <- cor(cross_tab_crypto[, -1], use = "complete.obs") 1302 | 1303 | # Create jointplot for Bitcoin and Ethereum 1304 | ggscatter(cross_tab_crypto, x = "Bitcoin", y = "Ethereum", 1305 | add = "reg.line", conf.int = TRUE, 1306 | cor.coef = TRUE, cor.method = "pearson", 1307 | xlab = "Bitcoin", ylab = "Ethereum", 1308 | title = "Bitcoin and Ethereum Jointplot") 1309 | 1310 | # Create jointplot for Polkadot and Ethereum 1311 | ggscatter(cross_tab_crypto, x = "Polkadot", y = "Ethereum", 1312 | add = "reg.line", conf.int = TRUE, 1313 | cor.coef = TRUE, cor.method = "pearson", 1314 | xlab = "Polkadot", ylab = "Ethereum", 1315 | title = "Polkadot and Ethereum Jointplot") 1316 | 1317 | 1318 | ``` 1319 | ## Volatility Analysis 1320 | # Volatility is one of the most important pillars in financial markets. 1321 | # A cryptocurrency or stock is said to have high volatility if its value can change dramatically within a short span of time. 1322 | # On other hand, lower volatility means that value of crypto tends to be relatively steady over a period of time. 1323 | # These movements are due to several factors including demand and supply, 1324 | # sentiment, corporate actions, greed, and fear, etc. 1325 | # Mathematically, volatility is measured using a statistical measure called ‘standard deviation’, 1326 | # which measures an asset’s departure from its average value. 1327 | # We have already calculated the intraday returns (daily returns) of the 10 cryptos . 1328 | # Next, we will calculate the 7-day rolling mean(also called moving average) of the daily returns, 1329 | # then compute the standard deviation (which is square root of the variance) and plot the values. 1330 | # Relax, we don’t have to calculate all this manually; Pandas ‘rolling()’ function and ‘std()’ 1331 | # function does the job for us in just one line! 1332 | 1333 | ```{r} 1334 | library(dplyr) 1335 | library(tidyr) 1336 | library(zoo) 1337 | library(ggplot2) 1338 | 1339 | # Combine daily returns for all cryptocurrencies into a single data frame 1340 | crypto1_df <- bind_rows(list_df, .id = "Name") 1341 | 1342 | # Calculate 7-day rolling mean of daily returns for each cryptocurrency 1343 | crypto1_df <- crypto1_df %>% 1344 | group_by(Name) %>% 1345 | mutate(rolling_mean = rollmean(Day_Pct_Change, 7, align = "right", fill = NA)) 1346 | 1347 | # Calculate 7-day rolling standard deviation of daily returns for each cryptocurrency 1348 | crypto1_df <- crypto1_df %>% 1349 | group_by(Name) %>% 1350 | mutate(rolling_std = rollapply(Day_Pct_Change, width = 7, FUN = sd, align = "right", fill = NA)) 1351 | 1352 | # Plot rolling standard deviation of daily returns for each cryptocurrency 1353 | ggplot(crypto1_df, aes(x = Date, y = rolling_std, color = Name)) + 1354 | geom_line() + 1355 | labs(x = "Date", y = "Standard Deviation", color = "Cryptocurrency")+ 1356 | labs(color = "Cryptocurrency") + 1357 | scale_color_discrete(name = "Cryptocurrency", labels = unique(crypto_names)) 1358 | 1359 | ``` 1360 | 1361 | #dogecoin seems to be most volatile followed by solana 1362 | #Tether -USDT AND USD coin are least volatile which is also because they are stable coins 1363 | #Bitcoin seems to be the highest priced cryptocurrency but if compared to other cryptocurrencies its volatility is low 1364 | #The low volatility of bitcoin can also be understood from its highest market capitalization and price similar to large cap 1365 | #stocks in share market 1366 | 1367 | # Many traders and investors seek out higher volatility investments in 1368 | # order to make higher profits. 1369 | # If a crypto price does not move, not only it has low volatility, 1370 | # but also it has low gain potential. 1371 | # On the other hand, a crypto price or other security with a very high 1372 | # volatility level can have tremendous profit potential, but the risk is equally high. 1373 | 1374 | ```{r} 1375 | ``` 1376 | 1377 | ```{r} 1378 | ``` 1379 | 1380 | ```{r} 1381 | ``` 1382 | 1383 | ```{r} 1384 | ``` --------------------------------------------------------------------------------