The Alpaca brokerage service is very useful for algorithmic traders that comes with an API to retrieve data and execute trades in a paper or live environment. While you can also check the status and returns of your positions through the API, Alpaca has spent some time creating a frontend where users can visually check their live and paper accounts. Seeing that Alpaca is more focused on building out robust API’s for its users, the frontend is very simple and provides the bare necessities.
When trading in markets such as equities or currencies it is important to identify value areas to inform our trading decisions. One way to do this is by looking at the volume profile.
In this post, we explore quantitative methods for examining the distribution of volume over a period of time.
More specifically, we’ll be using Python and statistical and signal processing tools in SciPy’s suite of modules. Data plots are rendered with Plotly.
In this project, we are going to build a python script that will keep track of the latest bitcoin price. And it will send you a telegram message every 30 minutes (you can tweak that) with the latest 6 bitcoin prices (again you can tweak that too). You can set a minimum threshold value so that if the BTC price goes below that threshold, then the script will send an immediate alert message showing the price.
It’s easy to get carried away with the wealth of data and free open-source tools available for data science. After spending a little bit of time with the quandl financial library and the prophet modeling library, I decided to try some simple stock data exploration. Several days and 1000 lines of Python later, I ended up with a complete stock analysis and prediction tool. Although I am not confident (or foolish) enough to use it to invest in individual stocks, I learned a ton of Python in the process and in the spirit of open-source, want to share my results and code so others can benefit.
A common misconception is that the market cannot be predicted and that hedge fund managers are no better than dart-throwing monkeys. Many academic research papers back up this claim with data. This is an overly simplistic view. Just because some markets cannot be predicted under some experimental settings, such as equities traded on a daily basis, this does not mean no market can be predicted in any setting. Let us try to get an intuitive understanding of what it means to predict the market.
With Python code to scrape, extract, transform and load it into a HDF5 data store to please your future self.
This post will go through the process of gathering and cleaning this data followed by an exploratory analysis examining price trends and the impact of events on prices using data from the IEX API and scraped events from financial news sites.
“Buy the dip” — it’s a frustratingly simple piece of advice. Like most pieces of advice, it’s easier said than done and the giver of such advice has probably not attempted to practice what they preach. It induces FOMO, which leads to the “hope trade”, when the “hope trade” goes awry you’re stuck as the “long term investor” who “really believes in the company’s mission”.
The bot is written in Python and relies on two core libraries for the majority of its functionality: robin-stocks and ta. robin-stocks is a library that interacts with the Robinhood API and allows one to execute buy and sell orders, get real time ticker information, and more. ta is a technical analysis library that also incorporates the Python Pandas library to generate indicators from stock data.