Bitcoin Forum
December 02, 2016, 10:31:56 PM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: BTCUSD historical volatility  (Read 6513 times)
yomi
Jr. Member
*
Offline Offline

Activity: 40


View Profile
April 24, 2011, 12:17:59 AM
 #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!

17qXiw646kuukEwjArHNKCNPUh3HnXfgbw
1480717916
Hero Member
*
Offline Offline

Posts: 1480717916

View Profile Personal Message (Offline)

Ignore
1480717916
Reply with quote  #2

1480717916
Report to moderator
1480717916
Hero Member
*
Offline Offline

Posts: 1480717916

View Profile Personal Message (Offline)

Ignore
1480717916
Reply with quote  #2

1480717916
Report to moderator
1480717916
Hero Member
*
Offline Offline

Posts: 1480717916

View Profile Personal Message (Offline)

Ignore
1480717916
Reply with quote  #2

1480717916
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1480717916
Hero Member
*
Offline Offline

Posts: 1480717916

View Profile Personal Message (Offline)

Ignore
1480717916
Reply with quote  #2

1480717916
Report to moderator
1480717916
Hero Member
*
Offline Offline

Posts: 1480717916

View Profile Personal Message (Offline)

Ignore
1480717916
Reply with quote  #2

1480717916
Report to moderator
martin
Full Member
***
Offline Offline

Activity: 150



View Profile WWW
April 24, 2011, 02:50:08 AM
 #2

You can pull raw data from my monitor here:

http://bitcointalk.org/index.php?topic=3313.msg90683#msg90683

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.

tcatm
Sr. Member
****
Offline Offline

Activity: 337


View Profile
April 24, 2011, 01:17:54 PM
 #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
yomi
Jr. Member
*
Offline Offline

Activity: 40


View Profile
April 24, 2011, 05:19:34 PM
 #4

Martin, tcam, thanks for the info.

Both are very useful.

17qXiw646kuukEwjArHNKCNPUh3HnXfgbw
Spurious
Newbie
*
Offline Offline

Activity: 6


View Profile
June 03, 2011, 10: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.
k
Sr. Member
****
Offline Offline

Activity: 452


View Profile
June 03, 2011, 10: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
Spurious
Newbie
*
Offline Offline

Activity: 6


View Profile
June 03, 2011, 10: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
****
Offline Offline

Activity: 452


View Profile
June 03, 2011, 10: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
Spurious
Newbie
*
Offline Offline

Activity: 6


View Profile
June 03, 2011, 10: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
****
Offline Offline

Activity: 452


View Profile
June 03, 2011, 10: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.
Spurious
Newbie
*
Offline Offline

Activity: 6


View Profile
June 03, 2011, 10: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
****
Offline Offline

Activity: 452


View Profile
June 03, 2011, 11:01:57 PM
 #12

try formatting the cell, custom format.

Spurious
Newbie
*
Offline Offline

Activity: 6


View Profile
June 04, 2011, 12:57:10 AM
 #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?
toffoo
Sr. Member
****
Offline Offline

Activity: 392



View Profile
August 02, 2011, 09: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?

Fireball
Hero Member
*****
Offline Offline

Activity: 673


View Profile WWW
August 02, 2011, 10: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).

Margin trading platform OrderBook.net (ICBIT): https://orderbook.net
Follow us in Twitter: https://twitter.com/orderbooknet
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!