Zipline and PyFolio

Zipline and PyFolio abstract away the complexities of the backtesting and performance/risk analysis aspects of algorithmic trading strategies. Backtesting should include all relevant factors, such as slippage and trading costs. Zipline is one of the most advanced open source Python libraries for algorithmic trading backtesting engines. PyFolio is an open-source Python performance and risk analysis…

Financial Market Data Access in Python

Exploring the yahoofinancials Python library The yahoofinancials Python library provides free access to the market data available from Yahoo Finance, whose provider is ICE Data Services. It provides access to historical and, for most assets, also real-time pricing data for the following: Single-ticker retrieval Convert the nested JSON to a pandas’ DataFrame Real-time data retrieval…

Statistical Estimation, Inference, and Prediction

Four key statistical libraries in Python statsmodels is a Python library to explore data, perform statistical tests, and estimate statistical models Normal distribution test with Q-Q plots While there are many robust statistical tests for normal distributions, an intuitive visual method is known as a quantile-quantile plot (Q-Q plot). If a sample is normally distributed,…

Data Manipulation and Analysis with pandas

The name pandas is derived from panel data, an econometrics term for a multidimensional structured dataset. Introducing pandas Series, pandas DataFrames, and pandas Indexes pandas.Series The pandas.Series data structure represents a one-dimensional series of homogeneous values (integer values, string values, double values, and so on). Series are a type of list and can contain only…

Regular Expressions Based on Syntax Used by Perl

Symbol(s) Meaning Example Example Matches * Matches the preceding character, subexpression, or bracketed character, 0 or more times a*b* aaaaaaaa, aaaaabbbb, bbbbbbb + Matches the preceding character, subexpression, or bracketed character, 1 or more times a+b+ aaaaaab, aaaabbbbb, abbbbbbb [] Matches any character within the brackets (i.e., “Pick any one of these things”) [A-Z]* APPLE,…

How To Install Visual Studio Code on Kali Linux

Install Visual Studio Code on Kali Linux by using the official ATP repository. At first, update the system and install the package below. sudo apt update sudo apt install curl gpg gnupg2 software-properties-common apt-transport-https Import Microsoft GPG key to the Kali Linux curl https://packages.microsoft.com/keys/microsoft.asc | gpg –dearmor > microsoft.gpg sudo install -o root -g root…

Install Python Packages on Visual Studio Code

Visual Studio Code is a free programming software. It is multiple platforms software that you can install it on Windows, Linux and Mac OS. As a Python programmer, working on Visual Studio Code saves much time. However, Visual Studio Code only provides basic Python packages that are not enough for advanced programming. This screenshot shows…