Question: python Consider a scenario where you are tasked with developing an algorithmic trading strategy in Python. The historical price data for a given financial instrument

python
python Consider a scenario where you are tasked with developing an algorithmic

Consider a scenario where you are tasked with developing an algorithmic trading strategy in Python. The historical price data for a given financial instrument is provided in a CSV file named "orcl.csv." The file contains columns for "Date," "Open," "High," "Low," "Close," and "Volume.". Task-1: Load the historical data from the file orcl.csv into a list of dictionaries. Task-2: Calculate two technical indicators: i) Simple Moving Averages for a 5-day window ii) Relative Strength Index (RSI) for a 14-day window Task-3: Write each indicator to a file: Moving Averages to the file orcl-sma.csv and RSI to the file orcl-rsi.csv. RSI Definition: RSI =100[100(1+( Average Gain During Up Periods Average Loss During Down Periods ))] Average Gain =[( Past Average Gain )13+ Current Gain ]14 Average Loss =[( Past Average Loss )13+ Current Loss ]14 Notes: - Do NOT use any python library functions like Pandas. - Make sure to include comments to explain the code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!