Concepts of Theory & Python code to speed up your project.

This article aims to explain how to extract features from signal in Statistical-Time domain and Frequency domain (it is also possible to extract features in Time-Frequency domain with Short-Time Fourier Transform or Wavelet Decomposition, but they need a separate article to be explained well).
The points that will be studied in this article are two:
1. Basics concept on Features Extraction
2. Features Extraction in Python

1. Basics concept on Features Extraction

To explain what we will talk about I borrow a definition of :

“Feature extraction is a process of dimensionality reduction by which…


How to use Monte Carlo analysis on Python to evaluate the “hidden risks” of a trading strategy

Contents

  • What is Drawdown?
  • Calculate Drawdown on Equity
  • Evaluate the Worst Case Scenario

What is Drawdown?

Drawdown is a fundamental concept in money management as it measures the cost in terms of losses of a trading system and therefore helps to assess its level of risk and efficiency in some way.

Drawdown is a term that indicates the amount of money (as a percentage of the total capital) lost when trading, and the consequent reduction of your initial capital.

Normally the drawdown is calculated by finding the difference between a relative peak in equity capital and a relative depression. …


This article aims to explain how to do a simple analysis of the pairs to be used for Freqtrade trading strategy.

  • Transform json file to pandas dataframe
  • Understand and calculate Expectancy
  • Plotting rolling Expectancy

How to obtain and trasform backtest data

Freqtrade allows you to perform a backtest on the historical data of your strategy.
If - - export trades is added to the command to perform the backtest then you can also obtain a json file that saves all the buy and sell operations carried out during the backtest period.
An example of a command to perform the backtest is this:

freqtrade backtesting -c config.json --strategy…


This short article aims to clarify the first aspects needed to start analyzing an equity portfolio through Python.

  • Download share price
  • Calculate stocks’ correlation
  • Calculate portfolio’s return and volatility

How to download share price?

To download data easily and for free, you can rely on .

To do this, you need to import libraries that allow you to create a dataframe where you can enter data.

import pandas as pd

It will also need a function to download data.

from pandas_datareader import data as wb

Now you can download share price that interests you.
Create a list with ticker symbols, define time period in which…

Matteo Gambera

I’m an industrial automation engineer interested in data science and finance.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store