Inspiration

Financial market information is widely available, but it is often fragmented across separate charts, indicators, and analysis tools. I wanted to create a single Windows-based system that could combine domestic and international market data, forecast the direction of the Nikkei 225 and individual Japanese stocks five trading days ahead, and test take-profit and stop-loss rules using historical data.

The goal was not to create an investment recommendation tool, but a research and analysis support system that makes model outputs, market factors, historical charts, and simulation results easier to review in one place.

What it does

Nikkei 225 FSS provides three main functions:

  1. Nikkei 225 forecast

    • Forecasts the direction of the Nikkei 225 five trading days ahead
    • Displays the result using a six-level trend scale
    • Shows 60-session and two-year charts with analysis reports
    • Displays feature importance and the market factors behind the forecast
    • Shows historical validation cases, directional matches, and directional accuracy
  2. Individual Japanese stock forecast

    • Accepts one Japanese securities code at a time
    • Forecasts the stock’s direction five trading days ahead
    • Displays the result using the same six-level trend scale
    • Shows short-term and medium- to long-term charts with analysis reports
    • Displays the market factors and feature importance behind the current forecast
  3. Take-profit and stop-loss simulator

    • Applies user-defined take-profit and stop-loss rates to historical stock-price data
    • Simulates hypothetical trading in units of 100 shares
    • Displays final portfolio value, total return, win rate, maximum drawdown, and trade history
    • Compares the result with simply holding the same stock over the same period

The simulator is separate from the forecasting models and does not reproduce trades based on forecast results.

How I built it

The application was built as a local Windows web application using Python, FastAPI, HTML, CSS, and JavaScript.

Market data is retrieved through yfinance. Machine-learning components use scikit-learn, CatBoost, logistic regression, and related libraries.

The Nikkei 225 forecast combines data such as Japanese market prices, U.S. market indicators, foreign exchange rates, and the VIX. Time-series-based validation is used to reduce the risk of future data leaking into training or evaluation.

For individual stocks, a fixed logistic regression configuration is applied consistently across stocks to balance processing speed and fairness of analysis conditions.

Codex was used to generate, modify, debug, and test the application code. GPT-5.6 supported system design, specification refinement, display-content review, calculation checks, and final evaluation.

I personally designed and decided the project concept, feature specifications, market data selection, interface structure, simulation rules, evaluation methods, test items, defect-correction policy, and final feature decisions.

Challenges

One major challenge was preventing future market data from being included in model training or evaluation. I addressed this by using time-series-based validation and carefully separating training data from future evaluation periods.

Another challenge was balancing model complexity, processing time, and consistency across many individual stocks. A fixed logistic regression approach was selected for the standard individual-stock prediction path.

It was also important to clearly separate forecasting from historical simulation. The simulator therefore applies only user-defined rules to historical data and does not use the forecast output as a trading signal.

Accomplishments

I completed a working local application that brings together forecasting, chart analysis, feature importance, historical validation, and trading-rule simulation in one interface.

The application includes automated tests, Windows launch scripts, English setup documentation, and a public demonstration video.

I also focused on responsible presentation by avoiding exaggerated profit claims, clearly separating model outputs from investment advice, and displaying unfavorable validation results rather than hiding them.

What I learned

This project reinforced the importance of:

  • preventing data leakage in time-series analysis,
  • separating prediction from historical simulation,
  • validating calculation logic with automated tests,
  • making model outputs understandable without overstating certainty,
  • and using generative AI as a development assistant while keeping human control over specifications and final decisions.

What’s next

Future development may include:

  • extending the analysis approach to overseas indices such as the S&P 500,
  • improving the presentation of forecast factors,
  • expanding the range of market data and analysis targets,
  • and carefully reviewing legal and regulatory requirements before considering broader public use of the simulator.

Disclaimer

This project is a research and analysis support tool. It does not provide investment advice, recommend the purchase or sale of financial products, or guarantee future returns.

Built With

Share this project:

Updates