Description Usage Arguments Value
Returns a plot and statistics for a relative momentum based on error adjusted ranking OBS! Objects with only NA's values will be removed under calculations
1 2 3 4 5 |
listData |
Data from Yahoo in form OHLCAV. The adjusted prices is used s these must be present |
period |
Period at which one want to obtain data. Can be "days", "weeks", "months", "quarters" or "years" |
lookback |
Lookback periods used to rank assets |
dateStart |
Date at which the strategy shall start. The lookback period is looking before this date so it is the start date of the strategy. The form should be ex: "2018/", "2018-01/" or "2018-01-01/" |
weights |
weights when using a weighted momentum. Vector which should have lenth three and sum to one |
NumAssets |
Number of assets in optimal portfolio |
size |
Number of asset one buy (or sell) in each transaction. Default is one |
UseTC |
Logical if one want to use transaction cast |
TCmin |
Minimum transactionamount |
TCrate |
Rate in which the transaction cost is calculated. This is only used if it is over the minimal amount |
savePlot |
Outdir if one want to save plot |
name |
Used on graph. If savePlot !is.null then the name (OBS: also _MOM_period is appended) |
width |
If savePlot !is.null then the width of plot |
height |
If savePlot !is.null then the height of plot |
SMAperiod |
int Period one is using to calculate errors. These are calcualted on daily frequency and not the period specified |
list
name plotCumReturn |
ggplot of cumreturns for different assets |
name StatTable |
Table of statistics |
name xtable_StatTable |
LateX code for above table of statistics |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.