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

Implement Moving Average Cross-Over Stock Trading Strategy in Streamlit App #6

Closed
espin086 opened this issue Mar 7, 2024 · 2 comments · Fixed by #7
Closed

Implement Moving Average Cross-Over Stock Trading Strategy in Streamlit App #6

espin086 opened this issue Mar 7, 2024 · 2 comments · Fixed by #7
Assignees

Comments

@espin086
Copy link
Owner

espin086 commented Mar 7, 2024

Create a Python script to implement a simple moving average cross-over stock trading strategy using data from a SQLite database. The script should calculate the moving averages, generate buy/sell signals based on the cross-over.

Here is video showing how to do this: https://www.youtube.com/watch?v=PUk5E8G1r44

I would like to create a simple moving average cross-over stock trading strategy that will be integrated into a Streamlit application. The data for this strategy is stored in a SQLite database.

Requirements:

  1. Implement a moving average cross-over strategy using the data from the SQLite database.
  2. Integrate this strategy into a Streamlit application for easy visualization and interaction.
  3. Include data visualization to show the stock prices, moving averages, and buy/sell signals.
  4. Ensure the application is user-friendly and provides clear insights into the trading strategy.
  5. The code needs to be modular and all parameters (aka window) in the SMA function should be selected by the user before running analysis.

Additional Information:

  • The SQLite database contains historical stock price data that will be used for the moving average calculations, you will need to pick a ticker to analyze in the streamlit UI.
  • The moving average cross-over strategy should generate buy signals when the short-term moving average crosses above the long-term moving average, and sell signals when the short-term moving average crosses below the long-term moving average.
@espin086 espin086 assigned espin086 and ZaibyS and unassigned espin086 Mar 7, 2024
@ZaibyS
Copy link
Collaborator

ZaibyS commented Mar 7, 2024

@espin086
I've started working on this and will provide an update by tomorrow.

@ZaibyS
Copy link
Collaborator

ZaibyS commented Mar 8, 2024

@espin086
I've integrated a moving average cross-over strategy on the closing price of the stock and included data visualization to display stock prices, moving averages, and buy/sell signals.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants