EVOLUTION-MANAGER
Edit File: changes.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: Rate of Change / Momentum</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 ROC {TTR}"><tr><td>ROC {TTR}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Rate of Change / Momentum</h2> <h3>Description</h3> <p>Calculate the (rate of) change of a series over <code>n</code> periods. </p> <h3>Usage</h3> <pre> ROC(x, n = 1, type = c("continuous", "discrete"), na.pad = TRUE) momentum(x, n = 1, na.pad = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>Price, volume, etc. series 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>type</code></td> <td> <p>Compounding type; either <code>"continuous"</code> (the default) or <code>"discrete"</code>.</p> </td></tr> <tr valign="top"><td><code>na.pad</code></td> <td> <p>Should periods prior to <code>n</code> be appended? Default is <code>TRUE</code>.</p> </td></tr> </table> <h3>Details</h3> <p>The ROC indicator provides the percentage difference of a series over two observations, while the momentum indicator simply provides the difference. </p> <h3>Value</h3> <p>A object of the same class as <code>x</code> or a vector (if <code>try.xts</code> fails) containing the rate-of-change (or return) values for <code>ROC</code> or a vector containing the differenced price series for <code>momentum</code>. </p> <h3>Author(s)</h3> <p>Joshua Ulrich </p> <h3>Examples</h3> <pre> data(ttrc) roc <- ROC(ttrc[,"Close"]) mom <- momentum(ttrc[,"Close"]) </pre> <hr /><div style="text-align: center;">[Package <em>TTR</em> version 0.24.3 <a href="00Index.html">Index</a>]</div> </body></html>