-
-
Notifications
You must be signed in to change notification settings - Fork 301
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
STRATEGY: Detect abnormal volume increases using isolation forest #1863
base: main
Are you sure you want to change the base?
Conversation
Welcome back! @narumiruna, This pull request may get 442 BBG. |
58923fb
to
7959a9c
Compare
Re-estimated karma: this pull request may get 449 BBG |
7959a9c
to
a05733b
Compare
Re-estimated karma: this pull request may get 438 BBG |
a05733b
to
ed0be44
Compare
Re-estimated karma: this pull request may get 456 BBG |
ed0be44
to
ee0ee2e
Compare
Re-estimated karma: this pull request may get 459 BBG |
pkg/strategy/sentinel/math.go
Outdated
return sum / float64(len(floats)) | ||
} | ||
|
||
func calculateMovingMeanAndStdDev(samples []float64, length int) (float64, float64) { |
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.
we also have the std dev?
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.
I will add std dev method for floats.Slice
ee0ee2e
to
abdede6
Compare
Re-estimated karma: this pull request may get 492 BBG |
abdede6
to
679de06
Compare
Re-estimated karma: this pull request may get 511 BBG |
Re-estimated karma: this pull request may get 537 BBG |
This pull request introduces a new trading strategy named "Sentinel" and includes various changes to support its implementation. The most important changes include the addition of the configuration for the Sentinel strategy, updates to dependencies, and the implementation of the strategy itself.
Configuration and Dependencies:
config/sentinel.yaml
: Added configuration for sessions, persistence, and exchange strategies, including settings for the Sentinel strategy.go.mod
: Addedgithub.com/narumiruna/go-iforest
as an indirect dependency.pkg/cmd/strategy/builtin.go
: Imported the Sentinel strategy to make it available for use.Sentinel Strategy Implementation:
pkg/strategy/sentinel/strategy.go
: Implemented the Sentinel strategy, including methods for initialization, default settings, subscription to market data, and running the strategy. The strategy uses an Isolation Forest algorithm to detect anomalies in trading volumes.Utility Functions:
pkg/datatype/floats/slice.go
: AddedVar
andStd
methods to theSlice
type to calculate variance and standard deviation, which are used in the Sentinel strategy.