yomi (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
April 24, 2011, 12:17:59 AM |
|
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.csvand http://www.bitcoinwatch.com/trades.zipbut both are 404. Is there any place from where I can download the historical closing prices for mtgox? Thanks!
|
|
|
|
martin
|
|
April 24, 2011, 02:50:08 AM |
|
You can pull raw data from my monitor here: http://bitcointalk.org/index.php?topic=3313.msg90683#msg90683This 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.
|
|
|
|
|
yomi (OP)
Newbie
Offline
Activity: 39
Merit: 0
|
|
April 24, 2011, 05:19:34 PM |
|
Martin, tcam, thanks for the info.
Both are very useful.
|
|
|
|
Spurious
Newbie
Offline
Activity: 6
Merit: 0
|
|
June 03, 2011, 10:05:24 PM |
|
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.
|
|
|
|
k
|
|
June 03, 2011, 10:14:12 PM Last edit: June 03, 2011, 10:34:12 PM by kirian |
|
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
|
|
|
|
Spurious
Newbie
Offline
Activity: 6
Merit: 0
|
|
June 03, 2011, 10:23:08 PM |
|
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
|
|
June 03, 2011, 10:26:01 PM |
|
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
|
|
|
|
Spurious
Newbie
Offline
Activity: 6
Merit: 0
|
|
June 03, 2011, 10:32:03 PM |
|
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
|
|
June 03, 2011, 10:38:27 PM |
|
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.
|
|
|
|
Spurious
Newbie
Offline
Activity: 6
Merit: 0
|
|
June 03, 2011, 10:45:16 PM Last edit: June 03, 2011, 10:57:00 PM by Spurious |
|
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
|
|
June 03, 2011, 11:01:57 PM |
|
try formatting the cell, custom format.
|
|
|
|
Spurious
Newbie
Offline
Activity: 6
Merit: 0
|
|
June 04, 2011, 12:57:10 AM |
|
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?
|
|
|
|
toffoo
|
|
August 02, 2011, 09:41:10 PM |
|
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?
|
|
|
|
Fireball
|
|
August 02, 2011, 10:21:05 PM |
|
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).
|
|
|
|
|