Description Usage Arguments Details Value Note Author(s)

Various functions that may be useful in designing technical trading rules.

1 2 3 4 5 |

`x` |
Object that is coercible to xts or matrix. |

`n` |
Number of periods to use. |

`price` |
Price series that is coercible to xts or matrix. |

`signals` |
Signals to use (defaults to vector of ones). Use '0' for no position, '1' for long position, and '-1' for short position. |

`...` |
Further arguments to be passed from or to other methods. |

`growth`

calculates the growth of an investment using given prices and
signals.

`lags`

calculates the lags of a given series.

`growth`

returns a vector of the growth of the investment.

`lags`

returns a matrix of lagged values of the original vector.

In `growth`

you can specify the number of periods and type of
compounding to use when calculating returns of the price series via the
`'\dots'`

argument.

Joshua Ulrich

TTR documentation built on Sept. 21, 2018, 6:31 p.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.