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>
32 lines
726 B
Markdown
32 lines
726 B
Markdown
---
|
|
name: rsi
|
|
kind: function
|
|
lang: go
|
|
domain: finance
|
|
version: "1.0.0"
|
|
purity: pure
|
|
signature: "func RSI(data []float64, period int) []float64"
|
|
description: "Calcula el Relative Strength Index (RSI) usando suavizado de Wilder."
|
|
tags: [finance, indicator, rsi, momentum]
|
|
uses_functions: []
|
|
uses_types: []
|
|
returns: []
|
|
returns_optional: false
|
|
error_type: ""
|
|
imports: []
|
|
tested: false
|
|
tests: []
|
|
test_file_path: ""
|
|
file_path: "functions/finance/rsi.go"
|
|
---
|
|
|
|
# rsi
|
|
|
|
Calcula el Relative Strength Index (RSI) con el metodo de suavizado de Wilder. Los primeros `period` elementos son 0. El RSI oscila entre 0 y 100.
|
|
|
|
## Ejemplo
|
|
|
|
```go
|
|
result := finance.RSI([]float64{44, 44.34, 44.09, 43.61, 44.33, 44.83, 45.10, 45.42, 45.84}, 5)
|
|
```
|