113c6dfd71
11 funciones puras con implementación real: SMA, EMA, RSI, BollingerBands, VWAP, LogReturn, AnnualizedVolatility, SharpeRatio, MaxDrawdown, NormalizeOHLCV, TickToOHLCV 4 funciones impuras (stubs): FetchOHLCV, StreamTicks, WriteOHLCVToParquet, LoadOHLCVFromDuckDB Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.0 KiB
1.0 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| tick_to_ohlcv | function | go | finance | 1.0.0 | pure | func TickToOHLCV(prices, volumes []float64, timestamps []int64, intervalSecs int64) (open, high, low, close, vol []float64) | Agrega datos de ticks en velas OHLCV segun un intervalo de tiempo en segundos. |
|
|
|
false | false | functions/finance/tick_to_ohlcv.go |
tick_to_ohlcv
Agrega ticks (precio, volumen, timestamp) en velas OHLCV. Los ticks se agrupan en buckets de intervalSecs segundos. Los timestamps deben estar en unix seconds y ordenados cronologicamente.
Ejemplo
o, h, l, c, v := finance.TickToOHLCV(
[]float64{100, 101, 99, 102},
[]float64{10, 20, 15, 25},
[]int64{1000, 1005, 1055, 1060},
60,
)
// Genera 2 velas: [1000-1059] y [1060-1119]