phenance.com
About
Analyzing Bitcoin in R in the year 2025 - Part 1

Pub: 19.10.25

| By Anonymous

In Finance.

Tags: coding r bitcoin analysis .

Retrieving Bitcoin transaction data

Bitcoin data is no longer easily available at the transaction level easily as far as I know.

There are some options. In R you can use the short time series that you can get with getSymbols('BTC').

Or you can download a year at a time to get data starting from 2010 via coinmarketcap.com.

The data ends up looking something like this using chartSeries(xtsdat['2024-01-01/'], name='Bitcoin'):

Daily Bitcoin Price Chart

Some drawdowns listed from this dataset:

         From     Trough         To  Depth Length To Trough Recovery
1  2011-06-10 2011-11-18 2013-02-22 -0.932    622       162      460
2  2013-12-05 2015-01-14 2017-01-04 -0.845   1123       404      719
3  2017-12-17 2018-12-15 2020-11-30 -0.834   1077       363      714
4  2021-11-09 2022-11-21 2024-03-04 -0.766    844       377      467
5  2013-04-11 2013-04-16 2013-11-04 -0.701    208         6      202
6  2021-04-14 2021-07-20 2021-10-19 -0.531    189        98       91
7  2010-11-09 2010-12-05 2011-01-22 -0.520     74        27       47
8  2010-08-17 2010-09-17 2010-10-09 -0.378     54        32       22
9  2017-09-02 2017-09-14 2017-10-12 -0.355     41        13       28
10 2017-06-12 2017-07-16 2017-08-05 -0.348     55        35       20
11 2011-02-15 2011-04-04 2011-04-17 -0.338     62        49       13
12 2017-01-05 2017-01-11 2017-02-23 -0.326     50         7       43
13 2011-05-17 2011-05-20 2011-05-27 -0.315     11         4        7
14 2025-01-22 2025-04-08 2025-05-18 -0.281    117        77       40
15 2017-03-04 2017-03-24 2017-04-26 -0.265     54        21       33
16 2024-03-14 2024-09-06 2024-11-06 -0.262    238       177       61
17 2021-01-09 2021-01-27 2021-02-08 -0.254     31        19       12
18 2010-07-19 2010-07-22 2010-08-16 -0.253     29         4       25
19 2021-02-22 2021-02-28 2021-03-11 -0.216     18         7       11
20 2017-11-09 2017-11-12 2017-11-16 -0.202      8         4        4

Other articles