Skip to content

DorantVelija/fishy-stocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฃ Fishy Stocks โ€“ Because Your Goldfish is Smarter Than You

Ever wondered if your pet goldfish has a knack for the stock market? Well, wonder no more! Fishy Stocks lets your fish pick stocks based on which side of the tank they prefer. Because why trust Wall Street when you have Mr. Bubbles? Inspo Michael Reeves

๐Ÿ  How it Works

  1. The program fetches two random stocks from the S&P 500.
  2. The fish swims. The camera tracks its movement.
  3. Whichever side the fish spends more time on? BOOM. That's the stock it "buys."
  4. The transaction is logged in a CSV file for future fish-ancial analysis.

๐Ÿ“‚ What's in the Box?

  • logic.py โ€“ Handles the stock selection logic (seriously, itโ€™s random).
  • stock_api.py โ€“ Talks to Yahoo Finance so your fish can trade like a pro.
  • save_bought_stocks.py โ€“ Logs stock picks because data science.
  • video.py โ€“ Tracks your fish with OpenCV.
  • snp500.json โ€“ List of stocks in the S&P500.
  • stocks_bought.csv โ€“ A record of your fishโ€™s legendary (or tragic) investments.
  • requirements.txt โ€“ So you donโ€™t rage over missing dependencies.

๐Ÿ›  Setup

  1. Install dependencies:
    pip install -r requirements.txt
  2. Make sure your camera of choice is working (your fish is the trader, not you).
  3. Run the script and let the magic happen:

๐Ÿ“Š Sample CSV Output

Every time the fish makes a trade, the data is logged in stocks_bought.csv like this:

Symbol Short Name Price Bought Industry Date Stock Owned
AAPL Apple Inc. 184.32 Technology 2025-02-13 0.0542
GOOGL Alphabet Inc. 151.76 Technology 2025-02-13 0.0659
MSFT Microsoft Corp. 398.45 Technology 2025-02-14 0.0251

๐Ÿšจ A few important notes:

  • This project is adjusted to track GOLDFISH movements, in order to track any other colour of fish, the bounds will need to be changed.
  • I will post the results of my fishy stocks and their detailed performance in the future.
  • Not fish-ancial advice.

๐Ÿ“Š Live Demo

Check out the madness in action:
Fishy Stocks Demo

๐Ÿ”ฎ Can a Goldfish Predict the Market?

Probably not, but itโ€™s got about the same success rate as some hedge funds. Try it out and see if your fish is the next Warren Buffett!

๐ŸŸ๐Ÿ’ธ Happy Trading!

About

๐ŸŽฃ Fishy Stocks โ€“ Because Your Goldfish is Smarter Than You

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages