Bitcoin Forum

Economy => Speculation => Topic started by: dree12 on September 28, 2014, 11:33:17 PM



Title: Time-series analyses
Post by: dree12 on September 28, 2014, 11:33:17 PM
I was conducting some time-series analysis on Bitcoin/USD when I stumbled on this algorithm, which produced the following prediction:

https://i.imgur.com/bD6hfO8.png

I don't claim the algorithm has much skill (based on this dataset, it seems to perform almost as well as a simple exponential trendline, which is not surprising since the algorithm is just noise added to an exponential trendline). But I am impressed at how natural the price movements predicted seem. The chart looks nice :D.

The algorithm is fairly simple:

  • Treat the logarithm of the time series as a function with domain [0, π).
  • Detrend the dataset.
  • Fit the function as a linear combination of sin(x), sin(2x), sin(3x), etc. to the desired precision.
  • Extrapolate this to the domain [π, 2π).
  • Retrend the dataset and remove the logarithm to get predicted price values.
  • Multiply by the "depression factor" to correct predicted price values so as to be consistent with today's price.

Since this algorithm has no skill, I feel comfortable sharing it as a curiosity. Does anyone else have any similar failed models that nevertheless produce interesting results?


Title: Re: Time-series analyses
Post by: freedombit on January 06, 2015, 08:29:24 AM
Can you use the same algorithm and apply it to historical data? Would be interesting to see how it applies to the last few spikes.


Title: Re: Time-series analyses
Post by: kashish948 on January 06, 2015, 08:38:26 AM
I hope you are right about the price here  ;D


Title: Re: Time-series analyses
Post by: oda.krell on January 06, 2015, 11:30:23 AM
Can you use the same algorithm and apply it to historical data? Would be interesting to see how it applies to the last few spikes.

+1. Would be interesting to see the results of a "backtest" where you apply the algorithm you described on initial segments of the exchange data, arbitrarily chosen, say: 2010-2011, 2010-2012, 2010-2013 and see what you get and how it compares to reality.


Title: Re: Time-series analyses
Post by: GGGGG on January 06, 2015, 11:47:40 AM
Why do you believe this algo to be accurate and reliable?? From my experience, there are thousands of Forex algos out there and they often show nonpresumable peak growth even when backtesting, but in reality the price is unpredictable as there are too many fundamental factors in the game, especially when we talk about the Bitcoin market, which is too shady.


Title: Re: Time-series analyses
Post by: Elwar on January 06, 2015, 12:05:19 PM
Why do you believe this algo to be accurate and reliable??

Where did OP say that?


Title: Re: Time-series analyses
Post by: GGGGG on January 06, 2015, 12:34:36 PM
Why do you believe this algo to be accurate and reliable??

Where did OP say that?

If not why bother? x = x * 2 gives you a guaranteed exponential growth, but who cares. I'd want something that works  :)


Title: Re: Time-series analyses
Post by: Q7 on January 06, 2015, 12:38:54 PM
I won't contest the accuracy of the algorithm without understanding the rationale and how it arrives at the equation. So in order to find out whether it is true or not, I will use the time period between now and July (based on the graph information) to find it the pattern predicted is accurate or otherwise. If it does I won't hesitate to dump everything I have, to buy when it touches below 200usd which should occur sometime in early July. Let's see. I've already bookmarked this page.


Title: Re: Time-series analyses
Post by: oda.krell on January 06, 2015, 02:27:52 PM
Why do you believe this algo to be accurate and reliable??

Where did OP say that?

If not why bother? x = x * 2 gives you a guaranteed exponential growth, but who cares. I'd want something that works  :)

Read OP again. He basically said "Hey, look at the interesting function I found. Probably not much to it, but appreciate comments on it". That's more or less all. Unless I misunderstood something drastically, there are zero claims to accuracy, but perhaps the hope to do something useful with what he came up with. He's presenting sth and collecting thoughts, basically.


Title: Re: Time-series analyses
Post by: RyNinDaCleM on January 06, 2015, 02:37:57 PM
Why do you believe this algo to be accurate and reliable??

Where did OP say that?

If not why bother? x = x * 2 gives you a guaranteed exponential growth, but who cares. I'd want something that works  :)

Read OP again. He basically said "Hey, look at the interesting function I found. Probably not much to it, but appreciate comments on it". That's more or less all. Unless I misunderstood something drastically, there are zero claims to accuracy, but perhaps the hope to do something useful with what he came up with. He's presenting sth and collecting thoughts, basically.

That and this

Since this algorithm has no skill....


Title: Re: Time-series analyses
Post by: Joe200 on January 06, 2015, 04:15:30 PM
  • Treat the logarithm of the time series as a function with domain [0, π).
  • Detrend the dataset.
  • Fit the function as a linear combination of sin(x), sin(2x), sin(3x), etc. to the desired precision.
  • Extrapolate this to the domain [π, 2π).
  • Retrend the dataset and remove the logarithm to get predicted price values.
  • Multiply by the "depression factor" to correct predicted price values so as to be consistent with today's price.

Since this algorithm has no skill, I feel comfortable sharing it as a curiosity. Does anyone else have any similar failed models that nevertheless produce interesting results?

You mean you changed the entire domain available at the time to [0, π)? Or do you change every year to [0, π), or something like that?

If it's the first, how do you refit the model as more data becomes available? Do you set the entire domain to [0, π) every time?

The "depression factor" bothers me. You mean, your model yields an expected price, which you have to change to current price?

Instead of doing that, try creating a model for the differences in price. That way, you won't need any depression factor. See the first model in my signature for an example.


Title: Re: Time-series analyses
Post by: dree12 on January 07, 2015, 02:37:37 AM
Unfortunately, I've lost the code to generate this model and the backtest results. If I remember right, the R2 was marginally lower than that of an exponential trend, which means that the model is probably marginally less accurate than an exponential extrapolation. The graph in the OP is roughly accurate so far only by coincidence.

  • Treat the logarithm of the time series as a function with domain [0, π).
  • Detrend the dataset.
  • Fit the function as a linear combination of sin(x), sin(2x), sin(3x), etc. to the desired precision.
  • Extrapolate this to the domain [π, 2π).
  • Retrend the dataset and remove the logarithm to get predicted price values.
  • Multiply by the "depression factor" to correct predicted price values so as to be consistent with today's price.

Since this algorithm has no skill, I feel comfortable sharing it as a curiosity. Does anyone else have any similar failed models that nevertheless produce interesting results?

You mean you changed the entire domain available at the time to [0, π)? Or do you change every year to [0, π), or something like that?

If it's the first, how do you refit the model as more data becomes available? Do you set the entire domain to [0, π) every time?

The "depression factor" bothers me. You mean, your model yields an expected price, which you have to change to current price?

Instead of doing that, try creating a model for the differences in price. That way, you won't need any depression factor. See the first model in my signature for an example.

Yes, I agree that the "depression factor" is not at all desirable. Also, you are correct that the refits require compressing the domain, and so even a minor refit can produce a significant change in the model. The only benefit of the model seems to be that the price movements look more natural than the other ones I've tried, with only negligible loss of skill. I will look at your model when I have time.


Title: Re: Time-series analyses
Post by: GÜNther.Danish on January 07, 2015, 02:55:17 AM
for now, it seems walked to your forecast


Title: Re: Time-series analyses
Post by: Callist0 on January 07, 2015, 03:21:49 AM
In my insignificant opinion price will drop very low this year.

Because I believe only a handful of people (even BTCTalkers) are "holders"

These real holders (who don't care about FIAT exchange rates) will be only ones left until end of 2015 and then BTC will rise like a phoenix from ashes.

Again going to 1200-2000$ range.

This trend will continue until 2020ish.

I wish with all my soul tho, that BTC may end current banking system.





Title: Re: Time-series analyses
Post by: p2pbucks on January 07, 2015, 04:16:59 AM
Your pic really scares me at first shot . But really wish this happen by the end of 2015  ;D