[R-SIG-Finance] [quantstrat] Trading a synthetic asset
Anass Mouhsine
anass.mouhsine at gmail.com
Wed Dec 22 15:24:09 CET 2010
Hi all,
While using the demos in package quantstrat ( btw a very nice and useful
package), I wondered about the application on a synthetic asset.
I've seen the possibilities offered by the FinancialInstrument package
on the subject. This package enables us to define a synthetic asset e.g.
a spread between two stocks.
My question is about the way of using this synthetic asset in a
quantstrat strategy.
How is it constructed? How is it handled by the getSymbols function used.
My problem can be seen in two ways:
1- I have a constructed a synthetic spread (of two stocks) as an xts
object with a varying ratios through time.
How can use it in a quantstrategy as an asset itself? Specifically,
since quantstrat uses mainly the getSymbols function, how the data
loading is done?
2-Suppose now I have the original symbols series and a time series of
weights defining the spread ratio.
I can use the getSymbols function to load original data. How can I
construct my time-varying spread using the package FinancialInstrument
and use it in a quantstrat framework?
I would like to know a little bit more about the logic intended when
facing this kind of use of the quantstrat framework.
Thank you for your insights,
Anass
More information about the R-SIG-Finance
mailing list