If you like stocks and are careful with the way you spend your money, you know how much time goes into buying shares of a stock. It’s tedious and I don’t have 24k for a Bloomberg terminal. Which led me to the idea during xmas break to spend the time creating my own terminal. I introduce you to “Gamestonk Terminal” (probably should’ve sent 1 tweet everyday to Elon Musk for copyrights permission eheh).
In summary, the Terminal (https://github.com/DidierRLopes/GamestonkTerminal) has 7 distinct menus:
- Discover Stocks
Top gainers; Sectors performance; upcoming earnings releases; top high shorted interest stocks; top stocks with low float; top orders on fidelity; and some SPAC websites with news/calendars. - Market Sentiment
Scrolling through Reddit main posts, and most tickers mentions; Extracting stocktwit sentiment based on bull/bear flags; Twitter in-depth sentiment prediction using AI; Google mentions over time. - Research Web pages
List of good pages to do research on a stock, e.g. macroaxis, zacks, macrotrends, .. - Fundamental Analysis
Read financials from a company from Market Watch, Yahoo Finance, Alpha Vantage, and Financial Modeling Prep API. - Technical Analysis
The usual technical indicators: sma, rsi, macd, adx, bbands, and more. - Due Diligence
Some features are: Latest news of the company; Analyst prices and ratings; Price target from several analysts plot over time vs stock price; Insider activity, and these timestamps marked on the stock price historical data; Latest SEC fillings; Short interest over time; A check for financial warnings based on Sean Seah book. - Prediction Techniques
The one I had more fun with. It tries to predict the stock price, from simple models like sma and arima to complex neural network models, like LSTM. The additional capability here is that all of these are easy to configure. Either through command line arguments, or even in form of a configuration file to define your NN.
But i was working through sigaloid's post here https://github.com/DidierRLopes/GamestonkTerminal/issues/2 And was still hitting a error on compile Generally ending with NFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 Ran the following to clear the error sudo apt-get install build-essential libssl-dev libffi-dev python3-dev Pretty sure libssl-dev and python3-dev were the only ones needed though Also UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning') So the following was needed as sigaloid stated pip3 install python-Levenshtein
No, for finance at large floats are often fine. Plenty of financial calculations cannot be done precisely using fixed point or arbitrary precision numbers either, so there's no point giving up the performance/ease of use that floating point offers. Billions of dollars is transacted based on Excel calculations every day, this whole fixed point for finance thing is a programmer myth.
Of course as you say for accounting you don't want to use floating point, but I can't see anything like that in this application.
You're cargo culting. Floating point numbers are perfectly fine for financial modeling and forecasting. If your goal is to figure out what stocks to buy/sell, it doesn't matter if your software calculates the P/E ratio as 19.232738273816 but the actual value is 19.232738273817. It doesn't even matter if you calculate it as 19.23 but the actual value is 19.22.
When you're storing balances or transacting payments between institutions, you need to emulate a specific set of operations, part of which includes using fixed point numbers. It is not sufficient to just use fixed point, you also need the correct number of digits (AFAIK it's 4 digits with US currency) you need the correct rounding mode, etc. Every few years someone comes along with a big new idea to rewrite the aging dinosaur COBOL code that runs the financial world in something modern. It never works. Nobody wants to go through the old COBOL code to figure out exactly what the code does, they take a greenfield approach with a description of what the UI is and an incomplete spec of the operations that need to happen. And then when it comes time to test the system, they get balances and numbers that are wrong. Because the only thing they know is "we need to use fixed point" but never bother to understand the actual full scope of how basic financial arithmetic is unique, and different from "normal" arithmetic.
Where is the market data (price, volume, etc) from? All open source projects related to stocks seem to use Yahoo quotes, which is essentially abandoned and not supported at all. No SLA or any indication of long term survival.
I found Alpaca[1] which looks decent in terms of a stock API and their upstream data provider Polygon.io[2] which looks even better but costs $199/mo for essentially per tick market data. [1] https://alpaca.markets/
[2] https://polygon.io
He just wanted to push his service. HN comment section has been unbearable recently with the substantial increase of people doing this. It has always been present but now it is almost reaching the point of making the comment section worthless.
They were using Polygon for data, but if I recall correctly, I believe seeing an email or such that they're going to roll out their own data and discontinue the Polygon "bridge".
if it doesn't come with an ISDA, I'm not interested.
"JP Morgan Employee : But, uh... you guys are under the capital requirements for an ISDA. Charlie Geller : By how much? JP Morgan Employee : [thinking] Uh... how much? One billion, four hundred seventy million. So... a lot. Charlie Geller : This makes us look bad, doesn't it? That we didn't know what the capital requirements were? JP Morgan Employee : Uh... it's not great. But keep up those returns and give us a call way down the line, you know. Okay?"
Watch the movie "the big short". It's really good. This is from one of the scenes where too guys try to get a license. Although the manage a few million dollars, in order to get the license they should have even more. Or as it turns out the right connections.
Comments (289) 55 threads
Show all comments
Showing thread 1 of 55
In summary, the Terminal (https://github.com/DidierRLopes/GamestonkTerminal) has 7 distinct menus: - Discover Stocks Top gainers; Sectors performance; upcoming earnings releases; top high shorted interest stocks; top stocks with low float; top orders on fidelity; and some SPAC websites with news/calendars.
- Market Sentiment Scrolling through Reddit main posts, and most tickers mentions; Extracting stocktwit sentiment based on bull/bear flags; Twitter in-depth sentiment prediction using AI; Google mentions over time.
- Research Web pages List of good pages to do research on a stock, e.g. macroaxis, zacks, macrotrends, ..
- Fundamental Analysis Read financials from a company from Market Watch, Yahoo Finance, Alpha Vantage, and Financial Modeling Prep API.
- Technical Analysis The usual technical indicators: sma, rsi, macd, adx, bbands, and more.
- Due Diligence Some features are: Latest news of the company; Analyst prices and ratings; Price target from several analysts plot over time vs stock price; Insider activity, and these timestamps marked on the stock price historical data; Latest SEC fillings; Short interest over time; A check for financial warnings based on Sean Seah book.
- Prediction Techniques The one I had more fun with. It tries to predict the stock price, from simple models like sma and arima to complex neural network models, like LSTM. The additional capability here is that all of these are easy to configure. Either through command line arguments, or even in form of a configuration file to define your NN.
But i was working through sigaloid's post here
https://github.com/DidierRLopes/GamestonkTerminal/issues/2
And was still hitting a error on compile
Generally ending with
NFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW. error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Ran the following to clear the error
sudo apt-get install build-essential libssl-dev libffi-dev python3-dev
Pretty sure libssl-dev and python3-dev were the only ones needed though
Also UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
So the following was needed as sigaloid stated
pip3 install python-Levenshtein
https://stackoverflow.com/questions/3730019/why-not-use-doub...
Of course as you say for accounting you don't want to use floating point, but I can't see anything like that in this application.
When you're storing balances or transacting payments between institutions, you need to emulate a specific set of operations, part of which includes using fixed point numbers. It is not sufficient to just use fixed point, you also need the correct number of digits (AFAIK it's 4 digits with US currency) you need the correct rounding mode, etc.
Every few years someone comes along with a big new idea to rewrite the aging dinosaur COBOL code that runs the financial world in something modern. It never works. Nobody wants to go through the old COBOL code to figure out exactly what the code does, they take a greenfield approach with a description of what the UI is and an incomplete spec of the operations that need to happen. And then when it comes time to test the system, they get balances and numbers that are wrong. Because the only thing they know is "we need to use fixed point" but never bother to understand the actual full scope of how basic financial arithmetic is unique, and different from "normal" arithmetic.
Continue this thread — 3 replies
I found Alpaca[1] which looks decent in terms of a stock API and their upstream data provider Polygon.io[2] which looks even better but costs $199/mo for essentially per tick market data.
[1] https://alpaca.markets/ [2] https://polygon.io
Continue this thread — 15 replies
They were using Polygon for data, but if I recall correctly, I believe seeing an email or such that they're going to roll out their own data and discontinue the Polygon "bridge".
"JP Morgan Employee : But, uh... you guys are under the capital requirements for an ISDA.
Charlie Geller : By how much?
JP Morgan Employee : [thinking] Uh... how much? One billion, four hundred seventy million. So... a lot.
Charlie Geller : This makes us look bad, doesn't it? That we didn't know what the capital requirements were?
JP Morgan Employee : Uh... it's not great. But keep up those returns and give us a call way down the line, you know. Okay?"
Continue this thread — 3 replies
Continue this thread — 3 replies
Continue this thread — 4 replies
Continue this thread — 5 replies
Continue this thread — 4 replies
Continue this thread — 4 more replies