Tag Archives: spread

What metrics I use to measure my long and short trades for spread trading opportunity

What metricsĀ  I use to measure my long and short trades for spread trading opportunity

This quick video explains it as part of my long and sort to measure who those pairs will be when trade ideas are generated. Once identified, they are added to my watchlist.

Continue reading

R Code for for charting Daily Crude Oil Futures spread of calendar spread of first two months

This came in from the NYC Contact which could be very very useful for y’all. More to come!

R Code for for charting Daily Crude Oil Futures spread (calendar spread of first two months) .

The chart shows mean reversion and volatility. Extreme contango has happened several times.
Here is the R code:

CL1 = read.csv('http://www.quandl.com/api/v1/datasets/CHRIS/CME_CL1.csv?&trim_start=1983-03-31&trim_end=2014-03-24&sort_order=desc', colClasses=c('Date'='Date'))

CL2 = read.csv('http://www.quandl.com/api/v1/datasets/CHRIS/CME_CL2.csv?&trim_start=1983-03-30&trim_end=2014-03-24&sort_order=desc', colClasses=c('Date'='Date'))

CL_Spread["Date"] = CL1["Date"]

CL_Spread["Settle"] = CL1["Settle"] - CL2["Settle"]

rdate fix(rdate)
plot(CL_Spread$Settle~rdate, type="l",col="blue",axes=F)
box()
axis(1,rdate,format(rdate,"%m-%y"))
axis(2,CL_Spread$Settle)

High frequency market data in R with realized volatility, spread, trade direction, bid/ask spread, calendar patterns with tick pattern

High frequency market data in R with realized volatility, spread, trade direction, bid/ask spread, calendar patterns with tick pattern

This is a pretty good tutorial PDF:

http://faculty.washington.edu/ezivot/research/hfanalysis.pdf

Get the data from: http://faculty.washington.edu/ezivot/splus.htm

This is hinted at the bottom of page2.Ensure to load the RTAQ R package from CRAN for use to load the data. Note that the TAQLoad has changed since this PDF so you will need to change the call.

This also contains some great metrics where you can instantly capture things llike realized volatility, spread, trade direction, bid/ask spread, calendar patterns with tick pattern

All I can say is wow!