backtestBeta2Neutral | R Documentation |
Idealized backtest on closing prices under a 2-asset beta neutral strategy. The estimating of the betas can be done on a rolling basis, optionally. Returns various measures of performance and plots the total log-growth of the indidivual assets compared to the benchmark and the beta-neutral portfolio.
backtestBeta2Neutral( asset, rolling, bankroll, rate, numDays, sampleSize, fraction )
asset |
the high beta asset to long |
rolling |
whether to use a rolling window of size |
bankroll |
initial bankroll |
rate |
the risk-free rate earned on cash |
numDays |
number of days to trade |
sampleSize |
initial training data size/rolling window size |
fraction |
fraction to trade in stocks versus cash |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.