47fac22230
- .claude/CLAUDE.md - .claude/commands/subagentes.md - .claude/rules/INDEX.md - .mcp.json - bash/functions/cybersecurity/analyze_dns.md - bash/functions/cybersecurity/audit_http_headers.md - bash/functions/cybersecurity/audit_ssh_config.md - bash/functions/cybersecurity/check_firewall.md - bash/functions/cybersecurity/detect_suspicious_users.md - bash/functions/cybersecurity/encrypt_file.md - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.1 KiB
1.1 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, 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 | params | output | tested | tests | test_file_path | file_path | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ema | function | py | finance | 1.0.0 | pure | def ema(data: list, period: int) -> list | Calcula la media movil exponencial (EMA) de una serie de precios. |
|
false |
|
lista de valores EMA con len(data) - period + 1 elementos (mas corta que la entrada) | false | python/functions/finance/finance.py |
Ejemplo
prices = [10, 11, 12, 13, 14, 15]
result = ema(prices, 3)
# [11.0, 11.5, 12.25, 13.125]
Notas
El primer valor de la EMA es el SMA del primer periodo. El multiplicador es 2 / (period + 1). Retorna len(data) - period + 1 elementos. Lista vacia si period invalido.