Log in to see Cloud of Tags

Wealth-Lab Wiki

TSF (Time Series Forecast)

RSS

Time Series Forecast: Indicator Documentation

Syntax


DataSeries TSF( DataSeries ds, int period, int ProjectionBar )

Parameter Description

ds Data series
period Indicator lookback period
ProjectionBar Project results by this number of bars into the future (negative) or past (positive). The default value is 0.

Description

The Time Series Forecast indicator displays the statistical trend of price over a specified lookback period based on linear regression analysis. The Time Series Forecast uses the last point of multiple linear regression trendlines, thereby acting as a "moving linear regression" line.

Compared to a moving average of price, Time Series Forecast (TSF) has noticeably less lag. Since the indicator is continuously "fitting" itself to the data instead of averaging, this makes the Time Sseries Forecast more responsive to short term price changes. In essence, it's a straight line drawn through the given number of recent price points and projected forward.

Interpretation

Typically, Time Series Forecast can be used in the manner of a responsive moving average. In addition, the indicator can be used to forecast the next period's price.

Example

This example illustrates how to plot the Time Series Forecast indicator.


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using Community.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { TSF tsf = TSF.Series( Close, 14, -2 ); PlotSeries( PricePane, tsf, Color.Blue, LineStyle.Solid, 1 );

} } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.


ScrewTurn Wiki. Some of the icons created by FamFamFam.