Skip to content

Unable to locate Adjusted Close pricing column in CSV data file. Prices cannot be adjusted.  #401

@meman987

Description

@meman987

I'm new to QSTrader (but I've played around with zipline a bit).

I get this error for all examples. I tried to add a Adjusted Close column (with the Close data) but it did not help:

Loading CSV files into DataFrames...
Loading CSV file for symbol 'EQ:SPY'...
Loading CSV file for symbol 'EQ:AGG'...
Adjusting pricing in CSV files...
Adjusting CSV file for symbol 'EQ:SPY'...
Traceback (most recent call last):
  File "/media/me/364b201e-3416-4537-bb16-98314b1ef284/git/gizur-trade-rndfy25/dec2024/qstrader/sixty_forty.py", line 27, in <module>
    data_source = CSVDailyBarDataSource(csv_dir, Equity, csv_symbols=strategy_symbols)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/me/micromamba-qstrader/lib/python3.12/site-packages/qstrader/data/daily_bar_csv.py", line 42, in __init__
    self.asset_bid_ask_frames = self._convert_bars_into_bid_ask_dfs()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/me/micromamba-qstrader/lib/python3.12/site-packages/qstrader/data/daily_bar_csv.py", line 197, in _convert_bars_into_bid_ask_dfs
    self._convert_bar_frame_into_bid_ask_df(bar_df)
  File "/home/me/micromamba-qstrader/lib/python3.12/site-packages/qstrader/data/daily_bar_csv.py", line 151, in _convert_bar_frame_into_bid_ask_df
    raise ValueError(
ValueError: Unable to locate Adjusted Close pricing column in CSV data file. Prices cannot be adjusted. Exiting.

Any help is much appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions