Spotting Trends Early in Financial Markets

Spotting Trends Early in Financial Markets

Table of Contents

    I have a keen interest in financial markets, particularly in technical analysis. Recently, I took on the challenge of writing my own trend prediction system for shares traded on the FTSE 100 index, major cryptocurrencies, and even gold futures.

    After studying the works of various authors and absorbing their insights on market movements and trends, I distilled the best of their ideas and developed the concept for this application to aid me in finding potentially profitable investment opportunity — and as a great portfolio project.

    In particular, the writings of Stan Weinstein (Secrets for Profiting in Bull and Bear Markets) and Robert D. Edwards and John Magee’s work on technical analysis inspired me to think, adapt, and combine existing indicators to make them more responsive to price and volume movements over time.

    The application I developed uses a weekly time frame, focusing on long-term trends rather than day trading. It aims to identify trends early enough to capitalize on the full movement all the way to the top.

    Given the daily volatility in the market, I wanted to filter out the noise and zero in on the broader market picture. I believe I achieved that and am confident enough in the system’s predictions to use it as part of my own investment making process.

    This application was built using Python, incorporating packages like Pandas, NumPy, Streamlit, and Matplotlib. It is hosted on an EC2 AWS instance and runs like a charm.

    Check out the video to see the app in action or check it out at https://sharemaestro.co.uk. Pay particular attention to the green and red lines on the Trend Prediction graph. A green or red dot approaching these lines often signals a significant trend movement—positive if it’s crossing the green line, negative if it’s nearing the red. The green and red markers indicate movement aligned with the trend direction, whether upward or downward. Once the trend line crosses either the upper or lower boundary, the journey to profit (or loss) is typically well underway.

    It’s been an interesting project, and along the way, I’ve learned a lot about Pandas, data frames, and creating visually meaningful graphs with Matplotlib.

    I coded all the indicators myself. I could have used the ta package to save time, but I really wanted to delve into the mechanics of the technical indicators in a much more granular way to understand how they work behind the scenes. It was a very valuable learning curve for me.

    In total the project took me a weekend to complete. It’s been a lot of fun and very educational.

    Published: 4 days, 21 hours ago.