statsArb

package module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 11, 2019 License: MIT Imports: 4 Imported by: 0

README

Stat arb tools

TODO...

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcBetaHat

func CalcBetaHat(l1, l2 []float64) (float64, error)

CalcBetaHat estimates beta hat

func CalcDist

func CalcDist(l1, l2 []float64) (float64, error)

func CalcEffectiveStandardDeviation

func CalcEffectiveStandardDeviation(betaHat, hedgeRatio, sigmaHat float64) float64

CalcEffectiveStandardDeviation ...

func CalcHedgeRatio

func CalcHedgeRatio(betaHat, sigmaHat float64) float64

CalcHedgeRatio ...

func CalcNotes added in v0.0.3

func CalcNotes(l1, l2 []float64) ([]float64, error)

func CalcSigmaHat

func CalcSigmaHat(l1, l2 []float64, beta float64) (float64, error)

CalcSigmaHat ...

func CalcSpread

func CalcSpread(p, q, hedgeRatio float64) float64

func CalcSpreadReturn

func CalcSpreadReturn(p, q, hedgeRatio float64) float64

func OptimalPercentPortfolio

func OptimalPercentPortfolio(chanceOfWin, avgWin, avgLoss float64) float64

OptimalPercentPortfolio ...

func OptimalStopLoss

func OptimalStopLoss(M, gain, loss, probCorrect float64) float64

OptimalStopLoss ...

func OptimalVarStopLoss

func OptimalVarStopLoss(b, variance, entry float64) (float64, float64)

OptimalVarStopLoss ... return is long / short

func StdDev

func StdDev(l1, weights []float64) (float64, error)

StdDev calculates the standard deviation

func ZNorm

func ZNorm(l1 []float64) ([]float64, error)

ZNorm calculates the ZNormalized list defined as Z = ( x - mean ) / std

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL