Bitcoin Forum
April 16, 2024, 08:45:31 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Alternate cryptocurrencies / Mining (Altcoins) / Mining vs. buying ETH analysis using Bitinfocharts raw data on: December 12, 2020, 01:56:25 PM
Since this topic has come up again recently I decided to re-extract the raw data available from the Bitinforcharts website for ETH daily mining profitability and ETH daily price and use the data to compare the profit from mining vs. buying the coin directly.

From the Bitinforcharts webpage on "Ethereum Mining Profitability historical chart: Mining Profitability USD/Day for 1 MHash/s" you can use scripts (python, sed, etc.) or even regexp in vi to extract the date and USD-per-MH-per-day data into a csv file.

Similarly from the Bitinforcharts webpage on "Ethereum Price in USD historical chart: Average price, per day, USD" you can also extract the date and USD-price-of-ETH into a csv file.

Then, dividing the data from the first csv file by the data in the second csv file will yield ETH-per-MH-per-day data.

Combined you will get a csv file similar to the following:

https://www.dropbox.com/s/arx2aqw11djk2i0/ethpermh.csv?dl=0

Which gives the Date, USD profitability per MH, USD price per ETH, and ETH per MH for each day.

To use the extracted data, let's say that back in March 1 2019 I bought a GTX 1660 Ti at a price of $280 and used it to mine ETH at 30 MH/s at 70 watts power draw, and accumulated all the ETH mined to sell on Dec 11 2020.

Loading up the csv file into a spreadsheet I can sum up the ETH-per-MH data from March 1 2019 up to Dec 11 2020, I multiply the sum value by 30 MH/s, and I get 1.644650613 ETH mined in total over that time period.

Over that same time period of 652 days the 70 watts power consumption cost me (using $0.10 per KWh):

70 * 24 / 1000 * 652 * 0.10 = 109.536

So in total for an expenditure of $280 for the GPU plus around $109 for electrical costs I mined 1.644650613 ETH, which if I sell on Dec 11 2020 at around $550 per ETH gives me $904.56 gross earnings, less the cost of the GPU and electricity gives me around $515 in profit.

If instead I had used the $280 (GPU) plus $109 (electricity) = $389 to directly buy ETH back in March 1 2019 for around $136 per ETH, I would have had 2.860294118 ETH. If I then sold that on Dec 11 2020 for around $550 per ETH I would have earned $1573.16, less the initial investment of $389 gives me a profit of around $1184, so over double the profit as compared to mining for this specific example.

You can test out buying/mining from various start dates and selling on other dates to see for which cases mining or buying is more profitable.

-----

Personally I buy and mine with GPUs because, as others have mentioned elsewhere, the GPUs are a hedge in the worst case (eg. ETH price goes to zero, etc.) as they can always be sold to to recoup some of the costs, plus I also use the GPUs for CUDA mining kernel development as a sideline to my regular programmer job.
2  Bitcoin / Bitcoin Discussion / Using multiple MatLab curve fittings on Bitcoin historical price data on: May 01, 2019, 02:37:53 PM

The "depressing" TL;DR clickbait:
- We will stay below 11,500 for the rest of 2019
- The earliest we can get back near 20,000 is around Dec 2020
- The earliest we can see 100,000 is around Mar 2024


----------

I've seen several approaches to curve fitting applied to price data such as those by @Awe_andWonder (e.g. https://twitter.com/awe_andwonder/status/1029461906753576960, in this case applied to total market cap), and thought I'ld try a variation of the usual curve fitting.

Instead of applying a single curve fit to the entirety of the price data, what I'll do is apply multiple curve fits to sets of the data up to a certain dates and then see how those historical curve fits then compare to the actual price action which occurred. This way I can see how well a curve fit for a set of data up to a certain date predicted the subsequent price movement.

Raw price daily data was taken from bitinfocharts.com (starting from Jul 17, 2010), and curve fitting was performed using MatLab's curve fitting tool with a 2-term power equation selected (MatLab results/equations will be provided below), with the the common logarithm taken of the raw data prior to curve fitting.

I'll be performing curve fits on the following sets of price data (according to the major bull runs of Bitcoin):

(1) Price data from start (07/17/10) till the low right before the 2011 bull run. This curve fit will then be compared to the price action during the 2011 bull run.
(2) Price data from start (07/17/10) till the low right before the 2013 bull run. This curve fit will then be compared to the price action during the 2013 bull run.
(3) Price data from start (07/17/10) till the low right before the 2017 bull run. This curve fit will then be compared to the price action during the 2017 bull run.

----------

Curve fit compared to 2011 bull run

Starting with the first set of data, apply a curve fit to the data from the period of 170 days after 07/17/10. The result is the following:

Quote
General model Power2:
     f(x) = a*x^b+c
Coefficients (with 95% confidence bounds):
       a =   0.0002096  (-0.0001077, 0.000527)
       b =       1.618  (1.323, 1.912)
       c =      -1.269  (-1.316, -1.222)

Goodness of fit:
  SSE: 2.289
  R-square: 0.8298
  Adjusted R-square: 0.8278
  RMSE: 0.1171

With the following graph (x-axis are number of days since Jul 17, 2010; y-axis is the Bitcoin price on a logarithmic scale):



Then add in the actual price action which occured during the 2011 bull run, resulting in this graph:



Notice how the subsequest price action was almost all underneath the projected curve fit line based on the data prior to the 2011 bull run.

----------

Curve fit compared to 2013 bull run

Moving on to the second set of data, apply a curve fit to the data from the period of 502 days after 07/17/10. The result is the following:

Quote
General model Power2:
     f(x) = a*x^b+c
Coefficients (with 95% confidence bounds):
       a =     0.05914  (0.01967, 0.09861)
       b =      0.6255  (0.5271, 0.724)
       c =      -1.771  (-1.991, -1.551)

Goodness of fit:
  SSE: 66.2
  R-square: 0.8062
  Adjusted R-square: 0.8054
  RMSE: 0.3642

With the following graph (x-axis is the number of days since Jul 17, 2010; y-axis is the Bitcoin price on a logarithmic scale):



Then add in the actual price action which occured during the 2013 bull run, resulting in this graph:



Notice how the subsequest price action was completely underneath the projected curve fit line based on the data prior to the 2013 bull run.

----------

Curve fit compared to 2017 bull run

Finally for the third set of data, apply a curve fit to the data from the period of 1660 days after 07/17/10. The result is the following:

Quote
General model Power2:
     f(x) = a*x^b+c
Coefficients (with 95% confidence bounds):
       a =     0.06375  (0.04671, 0.08078)
       b =      0.5742  (0.5411, 0.6073)
       c =      -1.571  (-1.701, -1.441)

Goodness of fit:
  SSE: 210.6
  R-square: 0.9081
  Adjusted R-square: 0.908
  RMSE: 0.3565

With the following graph (x-axis is the number of days since Jul 17, 2010; y-axis is the Bitcoin price on a logarithmic scale):



Then add in the actual price action which occured during the 2017 bull run, resulting in this graph:



Notice how the subsequest price action was completely underneath the projected curve fit line based on the data prior to the 2017 bull run.

----------

What now?

It's interesting to note how the historical curve fits using data prior to a bull run result in a projected line where the subsequent bull run price action lies below that projected line. In the case of the 2011 bull run, it's price action was almost all underneath the projected curve line. While in the cases of the 2013 and 2017 bull runs, their price actions were completely below the projected curve line.

It's almost as if the projected line was serving as an upper limit for the subsequent bull run's price action. The line doesn't give the actual prices at that point in time, rather it's indicating an upper limit for the price.

The question now is: does this historical pattern hold true for the present data? Does a curve fit using all data till the present result in a projected line where the next bull run's price action will remain below that line?

This is the curve fit applied to all data till the present:

Quote
General model Power2:
     f(x) = a*x^b+c
Coefficients (with 95% confidence bounds):
       a =      0.3132  (0.2636, 0.3627)
       b =      0.3707  (0.354, 0.3874)
       c =      -2.362  (-2.53, -2.194)

Goodness of fit:
  SSE: 394.7
  R-square: 0.93
  Adjusted R-square: 0.93
  RMSE: 0.3509

And this is the graph:



If, like what has happened in the previous bull runs, the next bull run's price action remains below that projected line then this would mean some interesting (sobering? depressing?) results:

- We will stay below 11,500 for the rest of 2019
- The earliest we can get back near 20,000 is around Dec 2020
- The earliest we can see 100,000 is around Mar 2024

I don't like these results because if we just take the last curve fit in isolation it offers a more optimistic outlook since the line looks like just an "average" of the price swing action, meaning we can go much higher above the line. But if we look at the performance of the historical curve fits, then it makes this latest curve fit line look like a price ceiling on the next bull run.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!