feat: tipos finance OHLCV, Tick, BollingerResult, DrawdownResult
Tipos de dominio financiero: - OHLCV: vela de mercado (product) - Tick: evento de trade individual (product) - BollingerResult: bandas superior/media/inferior (product) - DrawdownResult: max drawdown con indices pico-valle (product) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
package finance
|
||||
|
||||
// BollingerResult holds the three bands of a Bollinger Bands calculation.
|
||||
type BollingerResult struct {
|
||||
Upper []float64
|
||||
Middle []float64
|
||||
Lower []float64
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: bollinger_result
|
||||
lang: go
|
||||
domain: finance
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type BollingerResult struct {
|
||||
Upper []float64
|
||||
Middle []float64
|
||||
Lower []float64
|
||||
}
|
||||
description: "Resultado de Bollinger Bands con bandas superior, media e inferior."
|
||||
tags: [finance, bollinger, indicator, bands]
|
||||
uses_types: []
|
||||
file_path: "types/finance/bollinger_result.go"
|
||||
---
|
||||
@@ -0,0 +1,8 @@
|
||||
package finance
|
||||
|
||||
// DrawdownResult holds the maximum drawdown value and the indices where it occurred.
|
||||
type DrawdownResult struct {
|
||||
Value float64
|
||||
Start int
|
||||
End int
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
name: drawdown_result
|
||||
lang: go
|
||||
domain: finance
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type DrawdownResult struct {
|
||||
Value float64
|
||||
Start int
|
||||
End int
|
||||
}
|
||||
description: "Resultado de maximo drawdown con el valor de caida y los indices de inicio y fin."
|
||||
tags: [finance, drawdown, risk, metric]
|
||||
uses_types: []
|
||||
file_path: "types/finance/drawdown_result.go"
|
||||
---
|
||||
@@ -0,0 +1,10 @@
|
||||
package finance
|
||||
|
||||
// OHLCV represents a market candle with open, high, low, close prices and volume.
|
||||
type OHLCV struct {
|
||||
Open float64
|
||||
High float64
|
||||
Low float64
|
||||
Close float64
|
||||
Volume float64
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
name: ohlcv
|
||||
lang: go
|
||||
domain: finance
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type OHLCV struct {
|
||||
Open float64
|
||||
High float64
|
||||
Low float64
|
||||
Close float64
|
||||
Volume float64
|
||||
}
|
||||
description: "Vela de mercado con precios de apertura, maximo, minimo, cierre y volumen."
|
||||
tags: [finance, market, candle, ohlcv]
|
||||
uses_types: []
|
||||
file_path: "types/finance/ohlcv.go"
|
||||
---
|
||||
@@ -0,0 +1,11 @@
|
||||
package finance
|
||||
|
||||
import "time"
|
||||
|
||||
// Tick represents a single trade event in a market.
|
||||
type Tick struct {
|
||||
Symbol string
|
||||
Price float64
|
||||
Volume float64
|
||||
Timestamp time.Time
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
name: tick
|
||||
lang: go
|
||||
domain: finance
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type Tick struct {
|
||||
Symbol string
|
||||
Price float64
|
||||
Volume float64
|
||||
Timestamp time.Time
|
||||
}
|
||||
description: "Evento de trade individual en un mercado. Contiene simbolo, precio, volumen y timestamp."
|
||||
tags: [finance, market, tick, trade]
|
||||
uses_types: []
|
||||
file_path: "types/finance/tick.go"
|
||||
---
|
||||
Reference in New Issue
Block a user