Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where should I place daily_pv.h5 file so that it can be found? #646

Open
lyenliang opened this issue Feb 26, 2025 · 3 comments
Open

Where should I place daily_pv.h5 file so that it can be found? #646

lyenliang opened this issue Feb 26, 2025 · 3 comments
Labels
question Further information is requested

Comments

@lyenliang
Copy link

Hi, I just tried running rdagent fin_factor command.

This command always gives me FileNotFoundError: File daily_pv.h5 does not exist error.

I'm wondering where I should put this file?

I found that this file exists in RD-Agent/git_ignore_folder/factor_implementation_source_data/daily_pv.h5.

Why can't rdagent fin_factor detect this file automatically?

Here's the complete error message:

Role:user
Content: --------------Factor information:---------------
factor_name: Volume-Price Trend Factor
factor_description: This factor calculates the cumulative product of daily volume and the percentage change in closing price over a 20-day window. It aims to capture market momentum and investor sentiment by analyzing how changes in trading volume correlate with price movements.
factor_formulation: \text{Volume-Price Trend Factor}_{t} = \sum_{i=t-19}^{t} \left( V_{i} \times \frac{P_{i} - P_{i-1}}{P_{i-1}} \right)
variables: {'V_i': 'Trading volume on day i.', 'P_i': 'Closing price on day i.', 'P_{i-1}': 'Closing price on the previous day (i-1).'}
--------------Execution feedback:---------------
Traceback (most recent call last):
  File "/path/to/factor.py", line 23, in <module>
    main()
  File "/path/to/factor.py", line 16, in main
    df = pd.read_hdf('daily_pv.h5', key='data')
  File "/path/to/site-packages/pandas/io/pytables.py", line 424, in read_hdf
    raise FileNotFoundError(f"File {path_or_buf} does not exist")
FileNotFoundError: File daily_pv.h5 does not exist

Expected output file not found.
@lyenliang lyenliang added the question Further information is requested label Feb 26, 2025
@lyenliang lyenliang changed the title Where should I place daily_pv.h5 file? Where should I place daily_pv.h5 file so that it can be found? Feb 26, 2025
@lyenliang
Copy link
Author

lyenliang commented Feb 27, 2025

I've tried copying RD-Agent/git_ignore_folder/factor_implementation_source_data/daily_pv.h5 to RD-Agent/daily_pv.h5. Then I ran rdagent fin_factor under RD-Agent, but the problem still exists.

@lyenliang
Copy link
Author

I found that factor.py is located under RD-Agent/git_ignore_folder/RD-Agent_workspace/1dbe60140382470691a25360af967948/, which looks like a dynamically generated folder. How can I create daily_pv.h5 in this folder?

@TPLin22
Copy link
Collaborator

TPLin22 commented Feb 28, 2025

Hi,
You can try copying it to RD-Agent/git_ignore_folder/factor_implementation_source_data_debug/daily_pv.h5 and see if the issue is resolved."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants