Intraday volatility

Category : Uncategorized

Intraday volatility

Please make sure you have the most updated mfd_dm package for Stata installed for this post.

*
net from "http://www.researchforprofit.com/stata/mfd_dm"
* click on the blue mfd_dm package and then "click here to install" 
*

Following Stata code is for the intraday volatility between daily open, close, high and low prices.
Please make sure you have the most updated mfd_dm package for Stata installed for this post.

*

clear all
cd "/Users/mfd/Desktop" 
local symbol="AAPL" 

mfd_dm_prices `symbol' SPY QQQ, freq(d) chg(ln per) start(01jan2008) field(o c h l v) 
gen day=_n 
tsset day 
egen intra_sd=rowsd(low_`symbol' high_`symbol' open_`symbol' close_`symbol')

mfd_ta_MA intra_sd, period(20) ma_type(sma) 
twoway (line sma20_sd date if year(date)==2013, xlabel(#30, angle(vertical)) scale(.70))

*

int_sd