Table of Contents

Class RegressionResult

Namespace
Balsam
Assembly
Balsam.Backtester.dll

A class that encapsulates the result of simple linear regression.

public class RegressionResult
Inheritance
RegressionResult
Inherited Members
Extension Methods

Properties

Count

Gets the number of observations.

public int Count { get; }

Property Value

int

Date

Gets the date associated with this result, if any.

public DateTime Date { get; }

Property Value

DateTime

FStat

Gets the F statistic.

public double FStat { get; }

Property Value

double

Intercept

Gets the intercept (alpha) of the regression.

public RegressionCoefficient Intercept { get; }

Property Value

RegressionCoefficient

RSquared

Gets the R-squared.

public double RSquared { get; }

Property Value

double

Slope

Gets the slope (beta) of the regression.

public RegressionCoefficient Slope { get; }

Property Value

RegressionCoefficient

StdErrEstimate

Gets the standard error of the estimate.

public double StdErrEstimate { get; }

Property Value

double

Methods

GetPredicted(TimeSeries)

Returns a timeseries of the predicted dependent values based on the specified timeseries of independent or x variables.

public TimeSeries GetPredicted(TimeSeries independentObservations)

Parameters

independentObservations TimeSeries

Returns

TimeSeries

GetPredicted(double)

Returns the predicted dependent or y variable for based on the specified independent or x variable.

public double GetPredicted(double independentObservation)

Parameters

independentObservation double

Returns

double

GetResidual(TimeSeries, TimeSeries)

Returns the residual between the specified dependent or y variable and the predicted value based on the specified independent or x variable.

public TimeSeries GetResidual(TimeSeries dependentObservations, TimeSeries independentObservations)

Parameters

dependentObservations TimeSeries
independentObservations TimeSeries

Returns

TimeSeries

GetResidual(double, double)

Returns the residual between the specified dependent or y variable and the predicted value based on the specified independent or x variable.

public double GetResidual(double dependentObservation, double independentObservation)

Parameters

dependentObservation double
independentObservation double

Returns

double

ToString()

Returns a string representation of this object.

public override string ToString()

Returns

string