[R-SIG-Finance] [quantstrat] trading a synthetic asset -- example

Brian G. Peterson brian at braverock.com
Fri Dec 24 15:21:18 CET 2010


On 12/24/2010 07:40 AM, Anass Mouhsine wrote:
> I understand that the getPrice function works on OHLC prices.
> the synthetic asset, as such, is just a one column price time-series.

I figure I should probably clarify this too.

getPrice tries to figure things out from the structure of the data.  As 
such, it tests for OHLC, TBBO (tick), or univariate 'price' series and 
makes its best guess.

Beyond that, if the best guess isn't good enough, as in the proffered 
test case, the 'prefer=' argument will tell getPrice what column to go 
looking for in your data.

> Is there a way to use the applyStrategy function on non-OHLC time-series?

Yes.  We do it all the time on tick data, including synthetic 
instruments that may be univariate price series, or (for example) 
bid/ask/mid columns for a spread (to show execution slippage when 
crossing markets to hit the other side of the spread, for example).

Regards,

   - Brian


-- 
Brian G. Peterson
http://braverock.com/brian/
Ph: 773-459-4973
IM: bgpbraverock



More information about the R-SIG-Finance mailing list