Author

Topic: BTCUSD historical volatility (Read 6998 times)

hero member
Activity: 674
Merit: 500
August 02, 2011, 05:21:05 PM
#15
Yup, I'm not really sure how one would calculate annualized volatility on something that is continuously traded (tick data) 24h/7d.  I've only ever done it on daily closes and annualized it using 252ish trading days / year.

I think I started thinking about it for Bitcoins at some point, got to about where you are now, and never really figured it out.

Could somebody who really knows what they're doing explain how to do this?

Just set up a point in time and consider it as a day close. Same happens when going down - e.g. make hourly data from tick data: we just take hour's close as being 59 minutes 59 seconds, and next hour 0 minutes 0 seconds is the opening of a new hour (depends though, it might be that 0"0' would be hour's close and 0"1' would be opening of a new hour, would need to check in my app).
sr. member
Activity: 408
Merit: 261
August 02, 2011, 04:41:10 PM
#14
Yup, I'm not really sure how one would calculate annualized volatility on something that is continuously traded (tick data) 24h/7d.  I've only ever done it on daily closes and annualized it using 252ish trading days / year.

I think I started thinking about it for Bitcoins at some point, got to about where you are now, and never really figured it out.

Could somebody who really knows what they're doing explain how to do this?
newbie
Activity: 6
Merit: 0
June 03, 2011, 07:57:10 PM
#13
So, I calculated the standard deviations of logarithmic changes (ln(Price(n)/Price(n-1)) and multiplied by square root of sample to get annualized standard dev.

Total: 26.77807002
Since April 1st: 7.344956362


Are those numbers reasonable?
k
sr. member
Activity: 451
Merit: 250
June 03, 2011, 06:01:57 PM
#12
try formatting the cell, custom format.

newbie
Activity: 6
Merit: 0
June 03, 2011, 05:45:16 PM
#11
Your formula doesnt work for an unknown reason and I dont get why.

Edit: I split it between two columns and it works now.
k
sr. member
Activity: 451
Merit: 250
June 03, 2011, 05:38:27 PM
#10
it's time, price, amount

the time is unix (epoch) time (not sure if there is a difference or just different names for the same thing)

1282038389 = Tue, 17 Aug 2010 09:46:29 GMT

see http://www.epochconverter.com/

or use the formula I gave above in a spreadsheet.
newbie
Activity: 6
Merit: 0
June 03, 2011, 05:32:03 PM
#9
Idiot me.

1282038389,0.06300000,100.00000000

Ok, I misunderstood sth.

Ok, first one is time and I used the excel formula above and it didnt work for time only date.

=DATE(1970;1;1+(A3/(60*60*24)))+TIME(MOD(INT(A3/3600);24);MOD(INT(A3/60);60);MOD(A3;60))

Is this correct? I had to replace , with ;
k
sr. member
Activity: 451
Merit: 250
June 03, 2011, 05:26:01 PM
#8
in your browser there should be something like save page as. save it as a .csv or .txt  and then import it into Excel or whatever you want to use
newbie
Activity: 6
Merit: 0
June 03, 2011, 05:23:08 PM
#7
I havent downloaded it, because I cant download it in .csv format, it just shows me a HTML page with all the values and I look at it and say wtf.
k
sr. member
Activity: 451
Merit: 250
June 03, 2011, 05:14:12 PM
#6
i think the time is unix time. [edit: originally said UTC but meant to say unix time]

you can convert it into a more human readable form if you use a formula like this in Excel (where A2 is the UTC cell)
 
=DATE(1970,1,1+(A2/(60*60*24)))+TIME(MOD(INT(A2/3600),24),MOD(INT(A2/60),60),MOD(A2,60))

that'll give you day/month/year hour:min

you can use just

=DATE(1970,1,1+(A2/(60*60*24)))

to get day/month/year

hope that helps
newbie
Activity: 6
Merit: 0
June 03, 2011, 05:05:24 PM
#5
I have tried to get historical mtgox closing prices from both

http://bitcoincharts.com/t/trades.csv

You need to specify the symbol you want (e.g. mtgoxUSD in your case):

http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD

Also, if you want the complete history you need to set a start timestamp:
http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=0

Can you explain to me how I can get them with timestamps? My browser just shows me the the content of a .csv file and I cant really use it.
newbie
Activity: 39
Merit: 0
April 24, 2011, 12:19:34 PM
#4
Martin, tcam, thanks for the info.

Both are very useful.
sr. member
Activity: 337
Merit: 265
April 24, 2011, 08:17:54 AM
#3
I have tried to get historical mtgox closing prices from both

http://bitcoincharts.com/t/trades.csv

You need to specify the symbol you want (e.g. mtgoxUSD in your case):

http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD

Also, if you want the complete history you need to set a start timestamp:
http://bitcoincharts.com/t/trades.csv?symbol=mtgoxUSD&start=0
full member
Activity: 150
Merit: 100
April 23, 2011, 09:50:08 PM
#2
You can pull raw data from my monitor here:

https://bitcointalksearch.org/topic/m.90683

This has been running for quite a while, pulling minutely data from mtgox (and some other markets). Since mtgox doesn't ever close (afaik) I'm not sure which price you'd want. Maybe take the midday GMT price every day as your day price.

If you specify fetch=N it will only fetch N datapoints, i you do not specify fetch it will fetch the latest 1000 points. I suggest you set fetch=1000, then find the last date in that set, and now fetch=1000&start=YYYY-MM-DD, this way you can page through the data for as long as you like.
newbie
Activity: 39
Merit: 0
April 23, 2011, 07:17:59 PM
#1
I am starting work on an options trading platform. The first thing I want to calculate is the theoretical pricing of options, for which I need the historical volatility.

I have tried to get historical mtgox closing prices from both

http://bitcoincharts.com/t/trades.csv
and
http://www.bitcoinwatch.com/trades.zip

but both are 404.

Is there any place from where I can download the historical closing prices for mtgox?

Thanks!
Jump to: