EVOLUTION-MANAGER
Edit File: priceBands.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: Construct (optionally further smoothed and centered )...</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 PBands {TTR}"><tr><td>PBands {TTR}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Construct (optionally further smoothed and centered ) volatility bands around prices</h2> <h3>Description</h3> <p>John Bollinger's famous adaptive volatility bands most often use the typical price of an HLC series, or may be calculated on a univariate price series (see <code><a href="bollingerBands.html">BBands</a></code>). </p> <h3>Usage</h3> <pre> PBands( prices, n = 20, maType = "SMA", sd = 2, ..., fastn = 2, centered = FALSE, lavg = FALSE ) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>prices</code></td> <td> <p>A univariate series of prices.</p> </td></tr> <tr valign="top"><td><code>n</code></td> <td> <p>Number of periods to average over.</p> </td></tr> <tr valign="top"><td><code>maType</code></td> <td> <p>A function or a string naming the function to be called.</p> </td></tr> <tr valign="top"><td><code>sd</code></td> <td> <p>The number of standard deviations to use.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>any other pass-thru parameters, usually for function named by <code>maType</code>.</p> </td></tr> <tr valign="top"><td><code>fastn</code></td> <td> <p>Number of periods to use for smoothing higher-frequency 'noise'.</p> </td></tr> <tr valign="top"><td><code>centered</code></td> <td> <p>Whether to center the bands around a series adjusted for high frequency noise, default <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>lavg</code></td> <td> <p>Whether to use a longer <code>(n*2)</code> smoothing period for centering, default <code>FALSE</code>.</p> </td></tr> </table> <h3>Details</h3> <p>This function applies a second moving average denoted by <code>fastn</code> to filter out higher-frequency noise, making the bands somewhat more stable to temporary fluctuations and spikes. </p> <p>If <code>centered</code> is <code>TRUE</code>, the function also further smoothes and centers the bands around a centerline adjusted to remove this higher frequency noise. If <code>lavg</code> is also <code>TRUE</code>, the smoothing applied for the middle band (but not the volatility bands) is doubled to further smooth the price-response function. </p> <p>If you have multiple different price series in <code>prices</code>, and want to use this function, call this functions using <code>lapply(prices,PBands,...)</code>. </p> <h3>Value</h3> <p>A object of the same class as <code>prices</code> or a matrix (if <code>try.xts</code> fails) containing the columns: </p> <dl> <dt> dn </dt><dd><p> The lower price volatility Band. </p> </dd> <dt> center </dt><dd><p> The smoothed centerline (see details). </p> </dd> <dt> up </dt><dd><p> The upper price volatility Band. </p> </dd> </dl> <h3>Author(s)</h3> <p>Brian G. Peterson </p> <h3>See Also</h3> <p><code><a href="bollingerBands.html">BBands</a></code> </p> <h3>Examples</h3> <pre> data(ttrc) pbands.close <- PBands( 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>