View source: R/time_series_manip.R
Computes strategy returns given a strategy series which maps strategy states to 1 for long positions, -1 for short positions, and 0 for all others.
1 | strat_returns(prices, strats)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.