We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 29c2abb commit bbc24b4Copy full SHA for bbc24b4
toolkit/rebalancer.go
@@ -21,13 +21,13 @@ type (
21
22
func NewPortfolioWeights(distribution map[data.Currency]BaseWeight, epsilon float64) (*PortfolioWeights, error) {
23
weights := PortfolioWeights(distribution)
24
- if err := weights.isValid(epsilon); err != nil {
+ if err := weights.IsValid(epsilon); err != nil {
25
return nil, err
26
}
27
return &weights, nil
28
29
30
-func (f PortfolioWeights) isValid(epsilon float64) error {
+func (f PortfolioWeights) IsValid(epsilon float64) error {
31
sumWeights := 0.0
32
33
for _, weight := range f {
0 commit comments