Documentation ¶
Index ¶
- func EvolveAsInt(i int, r float64) int
- func EvolveFloat(f float64, r float64, limit float64) float64
- type Action
- type Benchmark
- type Buffer
- type ByScore
- type Config
- type ConfigSegment
- type Detail
- type Meta
- type Model
- type Option
- type Performance
- type Position
- type SegmentConfig
- type Segments
- type Signal
- type Stats
- type Trader
- type Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvolveAsInt ¶
func EvolveFloat ¶
EvolveFloat evolves a float number f is the number to be used as base r is the bias for producing a bigger or smaller number than the initial limit is the highest possible value for the new generated float. It acts as a cap
Types ¶
type Action ¶
type Action struct { Key model.Key Type model.Type Price float64 Time time.Time Duration time.Duration PnL float64 }
Action defines an action of a type
type Benchmark ¶
type Benchmark struct { Exchange map[model.Key]*local.Exchange Wallet map[model.Key]*trader.ExchangeTrader Actions map[model.Key][]Action Profit map[model.Key][]client.Report Timer map[model.Coin]int64 // contains filtered or unexported fields }
Benchmark is responsible for tracking the performance of signals
func NewBenchmarks ¶
func NewBenchmarks() *Benchmark
type ByScore ¶
type ByScore []Performance
type Config ¶
type Config struct { // Segments defines the configuration for different segments of analysis // it can relate to same coin with different observation intervals or different coins Segments SegmentConfig // Position defines the configuration for the position tracking and closing decisions Position Position // Option defines the algorithm running config options like logging level etc ... Option Option // Buffer defines the minimal grouping interval for observing positions Buffer Buffer // Segment defines the minimal grouping interval for market analysis Segment Buffer }
Config defines the configuration for the collector.
func (*Config) GetSegments ¶
GetSegments returns the segments that match the given parameters.
type ConfigSegment ¶
type ConfigSegment func(coin model.Coin) func(cfg SegmentConfig) SegmentConfig
type Detail ¶
Detail defines the network details to distinguish between different objects
func NetworkType ¶
type Model ¶
type Model struct { Detail Detail `json:"type"` BufferSize int `json:"buffer"` Threshold float64 `json:"threshold"` Spread float64 `json:"spread"` Size []int `json:"size"` Features []int `json:"features"` MaxEpochs int `json:"max_epochs"` LearningRate float64 `json:"learning_rate"` Multi bool `json:"multi"` }
Model defines the ml model config. BufferSize defines the size of the history buffer for the model reducing the buffer size will make the model more reactiv Threshold defines the model precision in order to make use of it increasing the threshold will reduce trading activity, but make the trading decisions more accurate Spread is used to quantize outputs of the model to make the output more simple Size defines the internal size of the model reducing the size will make the model more reactive Features defines the number of features to be used by the model depends strictly on the stats output MaxEpochs defines the maximmum epochs for the training process LearningRate defines the learning rate for the model
type Performance ¶
type Position ¶
type Position struct { OpenValue float64 StopLoss float64 TakeProfit float64 TrackingConfig []*model.TrackingConfig }
type SegmentConfig ¶
func (SegmentConfig) AddConfig ¶
func (sgm SegmentConfig) AddConfig(add ...func(cfg SegmentConfig) SegmentConfig) SegmentConfig
type Segments ¶
Segments defines the look back and ahead segment number. LookBack : the number of segments taken into account from the recent past LookAhead : the number of segments to be anticipated Gap : the numeric threshold for the price movement in regard to the current segment.
type Signal ¶
type Signal struct { Key model.Key `json:"Index"` Detail Detail `json:"detail"` Time time.Time `json:"time"` Price float64 `json:"price"` Type model.Type `json:"type"` Precision float64 `json:"precision"` Gap float64 `json:"gap"` Trend float64 `json:"trend"` Factor float64 `json:"factor"` Weight int `json:"weight"` Live bool `json:"live"` Buffer []float64 `json:"buffer"` Spectrum *coin_math.Spectrum `json:"-"` }
Signal represents a signal from the ml processor.
type Stats ¶
type Stats struct { LookBack int `json:"prev"` LookAhead int `json:"next"` Gap float64 `json:"gap"` Live bool `json:"live"` Model []Model `json:"model"` }
Stats defines the statistical properties of the set
type Trader ¶
type Trader struct { BufferTime float64 `json:"buffer_time"` PriceThreshold float64 `json:"price_threshold"` Weight int `json:"weight"` Live bool `json:"live"` }
Trader defines the trading configuration for signals BufferTime defines the time to wait for a signal to be confirmed by actual trading PriceThreshold defines the price threshold to verify the model performance within the above buffertime Weight defines the weight required by the model for the corresponding signal to be taken into account