changePercent(source) Returns the one-bar change percentage of the source. Parameters: source (float)
calculateKellyRatio(returns) Calculates the Kelly Ratio. Parameters: returns (array<float>)
calculateAdjustedKellyFraction(kellyRatio, riskTolerance, fedStance) Calculates the adjusted Kelly Fraction. Parameters: kellyRatio (float) riskTolerance (float) fedStance (string)
sumArray(arr) Sums the elements of a float array. Parameters: arr (array<float>)
calculateStdDev(returns) Calculates the standard deviation of an array of returns. Parameters: returns (array<float>)
calculateMaxDrawdown(returns) Calculates the maximum drawdown from an array of returns. Parameters: returns (array<float>)
calculateEV(avgWinReturn, winProb, avgLossReturn) Calculates the Expected Value (EV) of a bet. Parameters: avgWinReturn (float) winProb (float) avgLossReturn (float)
calculateTailRatio(returns) Calculates the Tail Ratio. Parameters: returns (array<float>)