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:
2026-03-28 02:23:08 +01:00
parent 9fb1e30e18
commit 6242613886
9 changed files with 108 additions and 0 deletions
View File
+8
View File
@@ -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
}
+17
View File
@@ -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"
---
+8
View File
@@ -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
}
+17
View File
@@ -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"
---
+10
View File
@@ -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
}
+19
View File
@@ -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"
---
+11
View File
@@ -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
}
+18
View File
@@ -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"
---