Bitcoin Forum
April 18, 2024, 08:48:58 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Time-series analyses  (Read 1531 times)
dree12 (OP)
Legendary
*
Offline Offline

Activity: 1246
Merit: 1077



View Profile
September 28, 2014, 11:33:17 PM
 #1

I was conducting some time-series analysis on Bitcoin/USD when I stumbled on this algorithm, which produced the following prediction:



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 Cheesy.

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?
"Bitcoin: the cutting edge of begging technology." -- Giraffe.BTC
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
freedombit
Sr. Member
****
Offline Offline

Activity: 274
Merit: 250


View Profile
January 06, 2015, 08:29:24 AM
 #2

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.
kashish948
Legendary
*
Offline Offline

Activity: 1596
Merit: 1000



View Profile
January 06, 2015, 08:38:26 AM
 #3

I hope you are right about the price here  Grin
oda.krell
Legendary
*
Offline Offline

Activity: 1470
Merit: 1007



View Profile
January 06, 2015, 11:30:23 AM
 #4

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.

Not sure which Bitcoin wallet you should use? Get Electrum!
Electrum is an open-source lightweight client: fast, user friendly, and 100% secure.
Download the source or executables for Windows/OSX/Linux/Android from, and only from, the official Electrum homepage.
GGGGG
Full Member
***
Offline Offline

Activity: 183
Merit: 100



View Profile
January 06, 2015, 11:47:40 AM
 #5

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.
Elwar
Legendary
*
Offline Offline

Activity: 3598
Merit: 2384


Viva Ut Vivas


View Profile WWW
January 06, 2015, 12:05:19 PM
 #6

Why do you believe this algo to be accurate and reliable??

Where did OP say that?

First seastead company actually selling sea homes: Ocean Builders https://ocean.builders  Of course we accept bitcoin.
GGGGG
Full Member
***
Offline Offline

Activity: 183
Merit: 100



View Profile
January 06, 2015, 12:34:36 PM
 #7

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  Smiley
Q7
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


View Profile WWW
January 06, 2015, 12:38:54 PM
 #8

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.

oda.krell
Legendary
*
Offline Offline

Activity: 1470
Merit: 1007



View Profile
January 06, 2015, 02:27:52 PM
 #9

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  Smiley

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.

Not sure which Bitcoin wallet you should use? Get Electrum!
Electrum is an open-source lightweight client: fast, user friendly, and 100% secure.
Download the source or executables for Windows/OSX/Linux/Android from, and only from, the official Electrum homepage.
RyNinDaCleM
Legendary
*
Offline Offline

Activity: 2408
Merit: 1009


Legen -wait for it- dary


View Profile
January 06, 2015, 02:37:57 PM
 #10

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  Smiley

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....

Joe200
Sr. Member
****
Offline Offline

Activity: 317
Merit: 250



View Profile
January 06, 2015, 04:15:30 PM
 #11

  • 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.
dree12 (OP)
Legendary
*
Offline Offline

Activity: 1246
Merit: 1077



View Profile
January 07, 2015, 02:37:37 AM
 #12

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.
GÜNther.Danish
Full Member
***
Offline Offline

Activity: 122
Merit: 100


View Profile
January 07, 2015, 02:55:17 AM
 #13

for now, it seems walked to your forecast
Callist0
Newbie
*
Offline Offline

Activity: 7
Merit: 0


View Profile
January 07, 2015, 03:21:49 AM
 #14

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.



p2pbucks
Hero Member
*****
Offline Offline

Activity: 642
Merit: 500


Evolution is the only way to survive


View Profile
January 07, 2015, 04:16:59 AM
 #15

Your pic really scares me at first shot . But really wish this happen by the end of 2015  Grin
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!