EVOLUTION-MANAGER
Edit File: TTRtools.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Miscellaneous Tools</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for lags {TTR}"><tr><td>lags {TTR}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Miscellaneous Tools</h2> <h3>Description</h3> <p>Various functions that may be useful in designing technical trading rules. </p> <h3>Usage</h3> <pre> lags(x, n = 1) growth(price, signals, ...) naCheck(x, n = 0) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Object that is coercible to xts or matrix.</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>Number of periods to use.</p> </td></tr> <tr valign="top"><td><code>price</code></td> <td> <p>Price series that is coercible to xts or matrix.</p> </td></tr> <tr valign="top"><td><code>signals</code></td> <td> <p>Signals to use (defaults to vector of ones). Use '0' for no position, '1' for long position, and '-1' for short position.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Further arguments to be passed from or to other methods.</p> </td></tr> </table> <h3>Details</h3> <p><code>growth</code> calculates the growth of an investment using given prices and signals. </p> <p><code>lags</code> calculates the lags of a given series. </p> <h3>Value</h3> <p><code>growth</code> returns a vector of the growth of the investment. </p> <p><code>lags</code> returns a matrix of lagged values of the original vector. </p> <h3>Note</h3> <p>In <code>growth</code> you can specify the number of periods and type of compounding to use when calculating returns of the price series via the <code>'\dots'</code> argument. </p> <h3>Author(s)</h3> <p>Joshua Ulrich </p> <hr /><div style="text-align: center;">[Package <em>TTR</em> version 0.24.3 <a href="00Index.html">Index</a>]</div> </body></html>