-
-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: add portfolio rebalancing strategy #357
Conversation
pkg/strategy/rebalance/strategy.go
Outdated
|
||
func (p *Portfolio) PrintValue() { | ||
value := p.TotalValue() | ||
log.Infof("portfolio value: %f %s", value.Float64(), p.BaseCurrency) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use market.BaseCurrencyFormatter and market.QuoteCurrencyFormatter
pkg/strategy/rebalance/strategy.go
Outdated
|
||
} | ||
|
||
func (s *Strategy) Rebalance(ctx context.Context, orderExecutor bbgo.OrderExecutor, session *bbgo.ExchangeSession) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if verbose than shows "Rebalancing..." here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
沒有特別想放什麼,拿掉好了XD
6969b47
to
531b221
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
awesome, thanks!
feature: add portfolio rebalancing strategy
No description provided.