Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Payoff ¶
Payoff calculates the ratio of average wins to average losses. Returns the absolute value of the ratio.
func ProfitFactor ¶
ProfitFactor calculates the ratio of total profits to total losses. Returns the absolute value of the ratio.
Types ¶
type BootstrapInterval ¶
type BootstrapInterval struct {
Lower float64 // Lower bound of the confidence interval
Upper float64 // Upper bound of the confidence interval
StdDev float64 // Standard deviation of the bootstrap samples
Mean float64 // Mean of the bootstrap samples
}
BootstrapInterval represents the confidence interval calculated by the bootstrap method.
func Bootstrap ¶
func Bootstrap(values []float64, measure func([]float64) float64, sampleSize int, confidence float64) BootstrapInterval
Bootstrap calculates the confidence interval of a sample using the bootstrap method. Parameters:
- values: The original sample data
- measure: The statistical function to apply to each bootstrap sample
- sampleSize: Number of bootstrap samples to generate
- confidence: Confidence level (e.g., 0.95 for 95% confidence)
Click to show internal directories.
Click to hide internal directories.