User
Write something
Batch 26 is happening in 4 hours
Error in train data.
Trying to run a back testing . have written below code +++ train.loc[:, 'Date'] = pd.to_datetime(train.index) # Fix here with .loc[] train.set_index('Date', inplace=True) +++ but getting below error. A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead could you explain why i am getting this error ?
0
2
New comment 10d ago
🚀Calculating CPR Levels on a Chart using Python Backtesting Libraries 🚀
I've been working on calculating CPR (Central Pivot Range) levels using a backtesting library, and it's been quite a learning experience! 📝 CPR is a great tool to analyze potential support and resistance levels, helping traders better understand market trends and reversals. However, setting it up with a backtesting library presented some challenges, especially when it came to accurate level plotting and configuring the chart for optimal insights. If you’re also exploring this, here’s a quick breakdown of the steps and some tips that might help: Define CPR Levels: To calculate CPR, you need to define the Central Pivot (CP), Top Central Pivot (TCP), and Bottom Central Pivot (BCP). This usually involves the day’s high, low, and close. Set Up Backtesting Charting: Use libraries like Backtrader or TA-Lib to plot CPR on historical data for better backtesting. Implement Visualization: Adding CPR levels directly on the price chart helps in visualizing key support/resistance zones. I'm still fine-tuning this setup, and any suggestions from the community would be appreciated! Drop a comment if you're familiar with these calculations or if you'd like to collaborate on this!
0
0
Run button issue
I can't run another file on replit.com because the run button is bound to a specific file I don't have anymore. How to change it and run the current openned file? Tryed a few ways suggested by different AI no of them worked
0
5
New comment Jul 18
Run button issue
How to handle jupyter notebook for Virtual env
Is virtual enviroment is not working with Jupyter notebook made under it. because I am trying to read an excel file under jupyter notebook but it is showing me the error as : "ImportError: Missing optional dependency 'openpyxl'. Use pip or conda to install openpyxl." However, it is installed in my virtual enviroment as I checked using pip freeze.
2
1
New comment Jul 4
1-4 of 4
Python for Quant Trading
skool.com/python-for-quant-trading
Community to learn python for quant finance and trading
Leaderboard (30-day)
powered by