Documentation — undoubtedly one of the crucial tasks of every data scientist, yet most likely also in the lowest ranks in terms of how enjoyable it is. I will not try to persuade you about the benefits of keeping an up-to-date documentation, that is a topic for another time.
In this article, I will show you a tool that can help with making the process much faster, more efficient, and even enjoyable. After all, a picture is worth a thousand words. …
Inflation — the word we hear in the news pretty much on a daily basis. We know that, long story short, inflation means that our money is worth less over time. But how much less and how to adjust the values for inflation? I will answer those questions in this article by showing how to work with inflation in Python. But first…
I won’t spend much time writing about the economics theory for inflation and its consequences, as this is a topic for a much longer article with a different focus. To define inflation in one sentence — it is…
It is a well-known fact that
matplotlib is very versatile and can be used to create pretty much any kind of chart you want. It might not be the simplest or prettiest, but after viewing enough questions on StackOverflow it will most likely work out quite well in the end.
I knew that it is possible to create financial plots such as a candlestick chart in pure
matplotlib, but that is not the most pleasant experience and there are much easier ways to do it with libraries such as
altair (I covered this in another article). However, only…
In this article, I wanted to quickly show a few useful
pandas methods/functions, which can come in handy during your daily work. To manage expectations, this is not an article showing the basic functionalities of
pandas and there is no particular theme to the methods. Without further ado, let’s start!
There are many ways of inspecting whether a Series/DataFrame contains missing values, including dedicated libraries such as
missingno. A simple way to check if a column of a DataFrame contains missing values could look as follows:
Alternatively, we can use the
hasnans method of a pd.Series …
In this post, I wanted to briefly describe another interesting library I recently came across —
stockstats. It is a wrapper library on top of a
pandas DataFrame and its main goal is to provide instantaneous access to a variety of measures and technical indicators related to stock prices. Let’s jump right into it!
Before being able to see what
stockstats has to offer, we need to import the libraries and download the data.
yfinance, we download Apple’s OHLC prices (+ volume) from 2020. For more details on the library, please refer to my other article.
I randomly encountered
chefboost in my Twitter feed and given that I never heard about it before, I decided to have a quick look into it and test it out. In this article, I will briefly present the library, mention the key differences from the go-to library which is
scikit-learn, and show a quick example of
chefboost in practice.
I think the best description is provided in the library’s GitHub repo: “chefboost is a lightweight decision tree framework for Python with categorical feature support”.
scikit-learn, these are the three features of
chefboost that stand out:
Back in 2017, Facebook released its Prophet model which had quite a big impact on the domain of time series forecasting. Many businesses started using it and testing out its functionalities as it provided quite good results out of the box. Fast forward a few years and now LinkedIn enters the field with its own algorithm called Silverkite and a Python library named
greykite, which is — I quote — a flexible, intuitive, and fast forecasting library.
Remember when you created that awesome interactive plot and it was really hard to embed it into your Medium post? Or you would like to enable the readers to have a look at the DataFrame, but maybe not necessarily just pasting in a screenshot of
df.head()? Such struggles are not limited to writing articles. You can also encounter them while preparing any kinds of reports which could use a nice viz to shows off the results of your analysis, but at the same time do not require lots of time and effort for preparation. …
In short, the candlestick chart is a type of financial plot used to describe the price movement of certain assets (stocks, crypto, etc.). In contrast to a simple line plot of the closing price, it offers much more information about the dynamics of the prices — it is based on OHLC data, meaning it contains the open, high, low, and close prices (often together with volume). These values can be shown at different sampling frequencies (minute, hour, day, week, etc.) and are often used as the basis of technical analysis.
Without going as deep as identifying patterns in the candlesticks…
Day trading is a type of speculation in which a trader buys and sells certain financial instruments (for example, stocks) within the same trading day. By doing so, the trader avoids potential unmanageable risks and negative price changes between one day’s close and the next day’s price at market open. Such traders often perform multiple trades within a single day, frequently also with leverage.
In this introductory article, I wanted to explore quite a simple strategy based on gaps. The idea behind gap trading lies in the fact that in volatile markets, traders can benefit from significant jumps in asset…
Data Scientist, ML/DL enthusiast, quantitative finance, gamer.