Skip to content

strategy: add neutral maker#1130

Open
austin362667 wants to merge 5727 commits into
c9s:mainfrom
austin362667:austin362667/neutralmaker
Open

strategy: add neutral maker#1130
austin362667 wants to merge 5727 commits into
c9s:mainfrom
austin362667:austin362667/neutralmaker

Conversation

@austin362667

Copy link
Copy Markdown
Collaborator

No description provided.

c9s and others added 30 commits March 1, 2023 21:09
strategy: rebalance: add order type parameter
FEATURE: add persistence service to environment
@bbgokarma-bot

Copy link
Copy Markdown

Welcome back! @austin362667, This pull request may get 621 BBG.

@codecov

codecov Bot commented Mar 24, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc74156) 19.94% compared to head (545f138) 19.94%.
Report is 1507 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1130   +/-   ##
=======================================
  Coverage   19.94%   19.94%           
=======================================
  Files         436      436           
  Lines       34072    34072           
=======================================
  Hits         6794     6794           
  Misses      26734    26734           
  Partials      544      544           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc74156...545f138. Read the comment docs.

s.futureStreamBook.BindStream(s.FutureSession.MarketDataStream)
s.spotStreamBook = types.NewStreamBook(s.SpotMarket.Symbol)
s.spotStreamBook.BindStream(s.SpotSession.MarketDataStream)
s.spot2StreamBook = types.NewStreamBook("BTCBUSD")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we pull out this to a config? thanks

s2ask, s2aok := s.spot2StreamBook.OrderBook.BestAsk()
fbid, fbok := s.futureStreamBook.BestBid()
fask, faok := s.futureStreamBook.BestAsk()
log.Infof("Futures Bid Price: %f, Future Ask Price: %f\n Spot Bid Price: %f, Spot Ask Price: %f", fbid.Price.Float64(), fask.Price.Float64(), sbid.Price.Float64(), sask.Price.Float64())

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log message starts with lower case letters

FutureMarket types.Market

BestBidPrice fixedpoint.Value
BestAskPrice fixedpoint.Value

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused variables?

return
case <-posTicker.C:
s.cancelOrders(ctx)
sbid, sbok := s.spotStreamBook.OrderBook.BestBid()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sbid, sask, ok := s.spotStreamBook.OrderBook.BestBidAndAsk()
if !ok {
    return
}


// SourceExchange session name
SpotExchange string `json:"spotExchange"`
// MakerExchange session name

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these comments are out of date?

SpotPosition *types.Position `json:"position,omitempty" persistence:"position"`
SpotProfitStats *types.ProfitStats `json:"profitStats,omitempty" persistence:"profit_stats"`
FuturePosition *types.Position `json:"position,omitempty" persistence:"future_position"`
FutureProfitStats *types.ProfitStats `json:"profitStats,omitempty" persistence:"future_profit_stats"`

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're using the same json keys in the fields

@CLAassistant

CLAassistant commented Jan 24, 2024

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
2 out of 4 committers have signed the CLA.

✅ narumiruna
✅ c9s
❌ austin362667
❌ gx578007
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants