mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-11 09:33:50 +00:00
15 lines
475 B
Go
15 lines
475 B
Go
package statistics
|
|
|
|
import (
|
|
"github.com/c9s/bbgo/pkg/types"
|
|
)
|
|
|
|
// Sharpe: Calcluates the sharpe ratio of access returns
|
|
//
|
|
// @param rf (float): Risk-free rate expressed as a yearly (annualized) return
|
|
// @param periods (int): Freq. of returns (252/365 for daily, 12 for monthy)
|
|
// @param annualize (bool): return annualize sharpe?
|
|
// @param smart (bool): return smart sharpe ratio
|
|
func Sharpe(returns types.Series, rf float64, periods int, annualize bool, smart bool) {
|
|
}
|