Skip to content

Commit

Permalink
makerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
VladKochetov007 committed Aug 24, 2024
1 parent 29c2abb commit bbc24b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toolkit/rebalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ type (

func NewPortfolioWeights(distribution map[data.Currency]BaseWeight, epsilon float64) (*PortfolioWeights, error) {
weights := PortfolioWeights(distribution)
if err := weights.isValid(epsilon); err != nil {
if err := weights.IsValid(epsilon); err != nil {
return nil, err
}
return &weights, nil
}

func (f PortfolioWeights) isValid(epsilon float64) error {
func (f PortfolioWeights) IsValid(epsilon float64) error {
sumWeights := 0.0

for _, weight := range f {
Expand Down

0 comments on commit bbc24b4

Please sign in to comment.