Bitcoin Forum

Bitcoin => Project Development => Topic started by: ninjabanker on September 19, 2013, 11:03:48 PM



Title: A math problem
Post by: ninjabanker on September 19, 2013, 11:03:48 PM
S(t) is the spot price of a given currency pair on a given exchange at time t.
I is a closed interval in the domain of S
f(n,t) is the n-day simple moving average (http://www.investopedia.com/terms/s/sma.asp) of S(t)
p ϵ [0,1]
P is a probability function

For a given S, I, p, and i, calculate n such that P( S(t+i) ≥ f(n,t) ) ≥ p for all t in I.


Title: Re: A math problem
Post by: cunicula on September 20, 2013, 05:15:14 AM
You need to specify the random process generating draws of daily spot prices.
I.e what is the probability distribution describing shocks to spot prices in each period? Are spot prices a random walk?
Are changes in spot prices autocorrelated? What is ther order of autocorrelation?

Perhaps the best question to ask is why do you want to know? If you're implementing something you are going to have to estimate the distribution based on historical data. That can easily go horribly wrong. It might be better to ask, "how can I implememt this without having to know the answer to this question myself?"