Using the quantmod package we can do pretty charts based on our aggregated daily time series.
library(quantmod)
I start all the time series from October 2017 so that the chart features are more visible.
png('btc_plot_daily_chart1.png')
chartSeries(rawdailyohlc['2017-10-01/'], name = 'Bitcoin USD')
addMACD()
dev.off()
png('btc_plot_daily_chart2.png')
barChart(rawdailyohlc['2017-10-01/'], theme = 'white.mono', bar.type = 'hlc', name = 'Bitcoin USD')
dev.off()
png('btc_plot_daily_chart3.png')
candleChart(rawdailyohlc['2017-10-01/'], multi.col = TRUE, theme = 'white', name = 'Bitcoin USD')
dev.off()
png('btc_plot_daily_chart4.png')
lineChart(rawdailyohlc['2017-10-01/'], line.type='h', TA = NULL, name = 'Bitcoin USD')
dev.off()
png('btc_plot_daily_chart5.png')
lineChart(rawdailyohlc['2017-10-01/'], line.type='h', TA = 'addVo();addBBands();addCCI()', name = 'Bitcoin USD')
dev.off()
png('btc_plot_daily_chart6.png')
chartSeries(rawdailyohlc['2017-10-01/'], theme = 'white', TA = 'addVo();addBBands();addCCI()', name = 'Bitcoin USD')
dev.off()
Moving on to calculating some summary statistics: Preliminary return analysis with plots
You can also jump to each section directly from here:
- Introduction to Bitcoin analysis with R
- Retrieving Bitcoin transaction data
- Part 2 - Reading the bitcoin data in to R
- Using the xts package and dates
- Using xts to summarize Bitcoin transaction data
- Setting up Bitcoin data in OHLC format
- Charting Bitcoin data
- Prliminary return analysis with plots
- Preliminary return analysis with rolling windows
- Technical analysis plots of Bitcoin
- Bitcoin's future price path
- Evaluating a portfolio
- Evaluating a stock portfolio
- Copulas and extreme values with Bitcoin
- Copulas and extreme value, many assets