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.
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.
Michael Lewis, author of the Big Short, also wrote Liar's Poker about his experience at Solomon Brothers in the mid-eighties where things like mortgage backed securities were invented. It's captivating.
Yep, plus that. Although I had to buy the Dutch (My native language) version too (first bought the English version). The subjects are pretty difficult so reading about them in my native language worked better for me.
Reading the comments, I'm struck by how I read this scene totally differently to most of them. I see an overworked, annoyed young analyst sent to deal with two rich kids (starting a hedge fund with money they made 'taking boats down the river', then skipping the ISDA requirements by calling their neighbour) who are wasting everyone's time by not even doing the absolute minimum research -- it was 2006, just Google ISDA and you find out the requirements.
Also a security guard kicking out two men in suits from a lobby is just weirdly unrealistic.
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.
The problem gets compounded as you chain more operations together. Financial calculations often involve long sequences of operations and that is where you can see the true effect of what I am mentioning.
With numbers that are large enough, a 1% or 0.1% difference means a lot of money. And if you have an automated system making decisions based on those numbers that can translate into financial ruin, legal problems, etc.
Leave the ad hominem aside, btw, noone wants to hear about it.
Fixed point numbers have finite precision. As soon as you multiply two fixed point numbers you risk losing precision unless you use more space for your result. You can’t fix your “long chain of calculation” by making it fixed point as you’ll still be rounding things (unless it happens that all your numbers need 54-63 bits of precision and you were wasting bits on the exponent)
Apart from in accounting, the two problems with floats are nonassociativity and speed, neither of which are particularly relevant here.
The risk of losing money does not look like subtle floating point rounding errors. It looks like someone fucking up a formula in excel or the model being wrong or the model being right but risk not being hedged.plenty of people in finance will add percentages as x + y instead of doing (1-(1+x)*(1+y)) because it’s simpler (this works fine because log(1+x) is approximately x when it’s small, and it can obviously be made better by taking the log earlier but plenty of percentage inputs to a model may be rough guesses anyway (who cares if you write 5% or log(5%)))
> 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.
The only way to improve on this description would be to note that the contract rate for each of the persons involved in this endeavor would be in the $485/hour range (of which, the labor provider might get $50). And then to note the 12 layers of management sign-off/approval on top of that - billed separately.
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.
Have you considered the problem that any publicly available indicator suffers from the fact that being the first to execute the strategy is the only way to make money? This would imply an entirely algorithmic trading strategy to reduce any potential for delay. That's how we end up with HFT. Maybe not subsecond HFT but <10s HFT.
NFO:pystan:COMPILING THE C++ CODE FOR MODEL anon_model_dfdaf2b8ece8a02eb11f050ec701c0ec NOW.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
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')
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.
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.
For real, this has been a big problem for a lot of people. So I built a real time comment pruning algorithm service that lets you browse HN with only quality comments. Subscribe today!
Who just wanted to push this service? OP or sevencolors?
Either way, as a counterweight to all the conspiracy theory nonsense on the web, I have been making an effort to not assume I know people’s hidden intentions. I’d like to invite you to join me in that.
Yeah im just as lost as you. Im not really sure who is pushing what service that is their own... either way, I did find all the links relevant, and worthwhile knowing about..... shrug
There are quite a lot of comments that make it to the top which say, "That's nice, I made this similar thing which is really interesting, here's a <link>." Followed by a big thread about their thing.
I don't mind those comments so much, as they can lead to good stuff, but I do mind them derailing the main thread when they are upvoted. So, I often downvote them in retaliation.
I am OK if it is something directly relevant to the topic and it is presented in a direct manner, but no, 99% of the time it is some disingenuous thing like this: "Hey guys you are talking about nuclear engineering, that made me wonder how fishes in my zone would be affected by a nearby nuclear plant . I use allmyfishes.com which seems to be a great site detailing all the fishes in the US, there is a free tier and good paid plans. _disclaimer_ I founded allmyfishes.com"
I think we need some sort of AI tool to identify these cases. I read a review on findbssales.io which says it could do exactly this, with a good payment model based on API calls.
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".
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.