Skip to content

Some RSI calculations are missing on the 1 minute timeframe #41

@hackcatml

Description

@hackcatml

Describe the bug
When running ta.rsi(close, 14) on a 1-minute timeframe dataset of size 1440, only 1434 RSI values are produced.
However, the correct number of results appears when using a 5-minute timeframe dataset.

To Reproduce
Steps to reproduce the behavior:

  1. Download 1m timeframe datasets.
    pyne data download ccxt --symbol "BITGET:BTC/USDT:USDT" --timeframe 1 --from "1"
  2. Create a simple Pyne strategy
"""
@pyne

This code was compiled by PyneComp — the Pine Script to Python compiler.
Accessible via PyneSys: https://pynesys.io
Run with open-source PyneCore: https://pynecore.org
"""
from pynecore import Series
from pynecore.lib import (
    close, script, ta, log
)


@script.strategy("my strategy", overlay=True, initial_capital=10000)
def main():
    rsi: Series[float] = ta.rsi(close, 14)
    log.info("rsi: {0}", rsi)
  1. Run the strategy
    pyne run test ccxt_BITGET_BTC_USDT_USDT_1.ohlcv

  2. Observe the bar index
    The final bar index is much lower than the number of rows in the OHLCV file.

Expected behavior
RSI values should be generated for every bar in the dataset.

Screenshots

  • OHLCV file size
Image
  • pyne run command result
Image Image
  • Missing calculations
    e.g., 2025-11-14 17:18:00+0000
Image Image Image

Environment:

  • OS: macOS
  • Version: (e.g. Ubuntu 22.04, Windows 11)
  • Python version: 3.11, 3.12, 3.13
  • How you ran the script: pyne run

Additional context
I tested this issue using the latest pynecore commit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions