Do you want to get into investing? 💵
Do you want to try your luck in the stock market? 📈
Do you want to get rich? 🤑
BUT.... are you scared of losing all your money!? 😰
Well worry no further with Mock investor, an all in one platform that allows you to see how you would do in the stock market!
- You can create an account, and using $10,000 virtual USD, mock invest in any stocks you want!
- Simply type the ticker code and the amount you want to buy and it will be added to your account!
- You can see how you with a live portfolio that updates constantly so you can see how your stocks and portfolio are doing, and if your portolfio actualy went above $10,000!!!
- Have fun and explore, and get into investing!

Users can create a new account by registering with a unique username and password. Registered users can log in to access their personalized dashboard.
Users can look up the latest stock prices by entering the stock symbol. The application uses the lookup function to fetch real-time data from a financial API.
Users can purchase stocks by entering the stock symbol and the number of shares they want to buy. The application checks if the user has enough cash to make the purchase and updates their portfolio and cash balance accordingly.
Users can sell stocks from their portfolio by specifying the stock symbol and the number of shares to sell. The application ensures the user has enough shares to sell and updates their portfolio and cash balance.
Users can view their current stock holdings, including the stock symbol, number of shares, current price, and total value of each holding. The total value of the portfolio, including available cash, is also displayed.
Users can view a detailed history of all their transactions, including buys and sells. Each entry includes the stock symbol, number of shares, price per share, and the date of the transaction.
Users can change their account password by entering their current password and the new password. The application verifies the current password and updates the password if the new password and confirmation match.
- Python
- Flask
- SQLite
- Bootstrap (for styling)
-
Clone the repository:
git clone https://github.com/aryanp05/mock-investing-finance.git cd mock-investing-finance -
Set up a virtual environment and install dependencies:
python3 -m venv venv source venv/bin/activate pip install -r requirements.txt -
Set up the database:
export FLASK_APP=app.py flask db init flask db migrate -m "Initial migration." flask db upgrade
-
Run the application:
flask run
-
Open your browser and navigate to
http://127.0.0.1:5000.
- Session Configuration: Configured to use the filesystem for session management.
- Database: SQLite database named
finance.db.
/: Shows the user's stock portfolio./buy: Allows the user to buy stocks./sell: Allows the user to sell stocks./quote: Allows the user to look up stock quotes./history: Shows the user's transaction history./login: Logs the user in./logout: Logs the user out./register: Registers a new user./change-password: Allows the user to change their password.
