Skip to content

Instantly share code, notes, and snippets.

@null712 null712/spread
Last active Aug 29, 2015

What would you like to do? = data[grep(data$date[i], data$date),] =[grep(“BUY”,$action),]
dayi.sell =[grep(“SELL”,$action),][i] = sum($quant *$price)/sum($quant)
trade.sell[i] = sum(dayi.sell$quant * dayi.sell$price)/sum(dayi.sell$quant)
trade.spread[i] =[i] - trade.sell[i]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.