CSCI 496: Senior Portfolio
In partial fulfillment of the requirements for the degree of Bachelor of Science in Computer-Science (class of 2026)
View My Resume
View My Handshake Profile
CSCI 496: Senior Portfolio
In partial fulfillment of the requirements for the degree of Bachelor of Science in Computer Science (class of 2026).
The full defense documentation is included below as the main portfolio artifact.
Student: Michael Ludwikowski
Advisor: Dr. Hayes
Program: B.S. Computer Science
Date: April 2026
The purpose of this project is to create an educational stock trading platform that helps beginner traders learn stock market concepts, practice decision-making, and understand portfolio risk without using real money. The platform combines fake-money trading, market data, charts, and AI-generated analysis to create a guided learning environment.
Many new traders enter the stock market with little practical experience and lose money because they do not understand market behavior, risk management, or trading discipline. Existing tools are often either too advanced for beginners or too simple to provide realistic practice. This project addresses that gap by offering a safe system where users can learn by doing, analyze results, and improve before ever risking real capital.
Stock trading education is difficult because users must learn both technical platform skills and market fundamentals at the same time. Core beginner challenges include:
To support those learning goals, this project combines:
This project required building skills beyond normal class assignments. I had to dive into multiple technical areas to put them into one working system and troubleshoot them together:
Flask web development: I learned how to build a multi-page web app with routes, sessions, and user workflows (login, trading actions, portfolio views, and practice/simulation pages).
Database design: I implemented SQLite tables and operations for users, accounts, holdings, and transactions. This included schema planning, data retrieval, updates after trades, and keeping the stored state consistent with the UI.
AI integration: I integrated a local Ollama model for recommendations and built fallback logic when the AI model is unavailable. This required prompt design, output parsing, error handling, and reliability testing.
Full-stack integration and testing: I connected backend logic, data services, AI output, chart rendering, and frontend display into one workflow. I also built and used test scripts and test cases to validate edge conditions and core features.
This shows how course knowledge in programming, data structures, software engineering, and databases was expanded into a larger, production-style project workflow.
The project requirements were developed in stages instead of being written all at once. I started with a broad idea focused on helping beginner traders learn safely, then narrowed the scope based on advisor feedback and technical research.
As I started planning out the project, I was able to create more practical requirements tied to real system behaviors, such as account management, stock data access, and AI recommendations. As the project progressed, I adjusted the requirements to keep the project in scope with the timeline while prioritizing the most important functionalities.
This progression also helped separate completed features from future enhancements. Core workflows were kept as high priority for the final build, while advanced items such as deeper AI automation and broader account workflows were documented as partial or future work.
The final project was built mainly in Python. The main controller is in src/app.py, where the core parts of the system are connected together. These parts include the trading engine, market data provider, AI prediction engine, simulation mode, practice mode, and the database layer. This made the project easier to organize and test because each major feature is separated into its own module.
The project supports both a command-line version and a Flask web version. The web version is the main interface for the final project because it is easier to demonstrate and gives a clearer view of balances, holdings, charts, and stock details. In the web app, users can register, log in, reset their account, browse stocks, view their portfolio, and make trades. There are also pages for practice mode, simulation mode, and learning content.
Market data is handled through the market_data.py module. The program can request stock quotes and historical data, cache the data, and use fallback behavior if the API is limited or unavailable. This was important because free APIs do not always respond quickly and may have usage limits. The charting portion of the project uses Bokeh so that users can view interactive stock charts instead of only seeing raw numbers.
The AI portion of the project is handled through predictor.py. The system sends recent historical data to a local Ollama model and asks for a recommendation such as BUY, SELL, or HOLD. The result also includes a confidence value, risk level, and short explanation. If the model is not available, the system still works by using a fallback prediction method based on recent price trend data. This made the project more dependable during development and testing.
Another major part of the project is the practice and simulation support. Simulation mode lets the user move through historical market data over time. Practice mode creates a guided environment with synthetic companies and events so the user can practice without depending only on live data. These features support the educational purpose of the project and make it more than a basic buy/sell demo.
Source code repository: https://github.com/MichaelLudwikowski/MLud-CSU-Senior-Project
Fig 1. Login page (web authentication entry point)

Fig 2. Dashboard view after login (initial account overview)

Fig 3. Stock search page (symbol search and popular stock list)

Fig 4. Stock detail page for AAPL (quick trade, AI recommendation, and interactive chart)

Fig 5. Dashboard after placing a trade (cash, portfolio value, and transaction log update)

Fig 6. Practice mode setup page (difficulty and session length options)

Fig 7. Practice mode active session (news events, progress, holdings, and gain/loss)

Fig 8. Practice stock detail page (generated company, AI recommendation, and chart)

One limitation of the project is that free market-data APIs have request limits. Because of that, the system uses caching and fallback behavior so that it can still show data even when the API cannot be called again right away. This reduces failures during demos and normal use.
Another limitation is that the AI features depend on a local Ollama setup. If Ollama is not running or the model is not installed, the full AI response will not be available. To reduce this problem, the project includes a fallback prediction method based on price trend analysis so that the application can still give a recommendation instead of failing completely.
Some planned features are not fully finished in the current version. Multiple account support exists in the data model but is not fully exposed in the user workflow. Margin trading logic also exists in code but is currently disabled. AI auto-investing and full AI training are only partially implemented. In this defense, those features should be presented as future improvements rather than as completed work.
The project is meant for education, not for real investing. Even when real market data is available, the system should not be treated as financial advice. This keeps the project focused on learning and practice instead of real-money trading.
These results support the main goal of the project, which is to provide a safe educational trading platform with portfolio tracking and AI assistance.
| Requirement Area | Evidence in Test Cases | Coverage Status |
|---|---|---|
| Account Management | TC-001 to TC-006 | Implemented |
| Wallet and Transactions | TC-007 to TC-012 | Implemented |
| Stock Data and Analysis | TC-015, TC-019, TC-047 | Implemented |
| Trading Operations | TC-013, TC-014, TC-017, TC-018, TC-020 | Implemented |
| AI Recommendations | TC-021 to TC-027 | Implemented (fallback supported) |
| Practice and Simulation | TC-028 to TC-032, TC-048 | Partially Implemented (manual-heavy) |
| Interface and Display | TC-033 to TC-035, TC-047, TC-048 | Implemented (primarily manual evidence) |
| Testing and Reliability | TC-036 to TC-046 | Implemented |
One of the first challenges that I faced was API reliability and rate limits. Since free market-data APIs can limit requests or respond slowly, I had to add caching and fallback behavior so the app would still work during demos and testing instead of failing when the API was unavailable.
Another challenge was AI dependency. The AI recommendation feature depends on a local Ollama model, so if the model server is not running or the model is not installed, predictions can fail. To handle this, I used fallback prediction logic so the system can still return a recommendation and keep the user workflow running.
A third challenge was balancing realism with eucational usability. I wanted the platform to feel like a real trading environment, but still be simple enough for beginners. This led to design decisions like fake-money accounts, clear dashboard metrics, practice mode with guided difficulty, and simulation mode for historical learning.
I also had to manage project scope over time. Some features were designed in the data model but not fully exposed in the current user workflow, such as full multi-account operation and deeper AI automation. Instead of forcing unfinished features into the final build, I prioritized making the core flows stable and presentable.
Overall, the main challenge was integration: combining data retrieval, AI analysis, trade execution, persistence, and frontend views into one consistent system. Solving those integration issues was one of the most important outcomes of the project.
Future work for this project includes finishing multi-account support, improving AI performance tracking, and expanding the educational side of the platform. More detailed alerts, better reporting, and additional learning activities would make the system more useful for beginner traders.
Another improvement would be better handling of real market data, especially around rate limits and refresh timing. The system could also be extended with stronger account security, more advanced portfolio analytics, and better administrative debugging tools.
Overall, the current version already demonstrates the main idea of the project, and future work would build on that foundation rather than restarting from scratch.