How can I create a Portfolio Tear-Sheet?

Alphacast pipelines can be used to design and test portfolio and trading strategies. With the "Porfolio Analysis" Step on the pipeline editor you can create tear-sheets from daily returns and also dynamic rolling stats for different timeframes.

image.png

Step 1. Load the data and calculate a daily return variable.

You can use any dataset you want to calculate daily returns. As an example, let's load Yahoo Finance data and calculate the daily return of three assets

  • In the pipeline editor (Click on create new at the top right --> Pipeline)

  • Add Yahoo Finance as your source

  • add the tickers that you want to analyze (i.e. MSFT, AAPL, GOOG)

  • Select the period

  • add a new step to "Calculate Variable" write the formula

    pct_change(@Close,1,@Ticker)
    

image.png

image.png

image.png

Step 2. Calculate the portfolio Tear Sheet

  • Add a new step "Portfolio Analysis"
  • Select the metrics that you want to calculate for your portfolio. Available stats are'**Annual return, Cumulative returns, Annual volatility, Sharpe ratio, Calmar ratio, Stability, Max drawdown, Omega ratio, Sortino ratio, Skew, Kurtosis, Tail ratio, Daily value at risk, Total Return
  • Select the variable with the daily returns. "pct_change" in this example

image.png

If Tear-sheet option is on then a single Tear sheet with results will be calculate for the whole sample period

image.png

If Tear-sheet option is off then stats will be estimated recursively for each day of the sample, estimating the stats calculated with data from that day up to the most current day.

In this case, two additional parameters are required

  • dropLastN implies that stats will not be calculated from the timeframes that begin in the last N days. Default excludes 252 trading days.
  • Skip days mean that the start will be calculated from timeframes with start days every N days. This parameter is important for performance reasons. Default is 10 days.

The resulting dynamic Tear Sheet will look like this dataset

Optional. Calculate Technical analytics for your portfolio

Remember that with the Technical Analysis: step* you can estimate 130 metrics for Technical Analysis of financial assets, Metrics include a number of cycles, momentum, volatility and volume Indicators, standard overlap studies, patterns recognition techniques, or statistic functions.Learn More

Luciano Cohan

Written by

Luciano Cohan

Co-Fundador de Alphacast. Ex Subsecretario de Programación Macroeconómica. Data Science. Creando una plataforma para el trabajo colaborativo en economías

Related insights

  • Read more...

    Alphatour: Navigating Global Financial Data with Alphacast

    Prepare for our worldwide data availability!

    Check out all Global Datasets here.

    Alphacast has become a crucial tool for those seeking up-to-date and high-quality information on global economy, market fluctuations and financial trends, as it provides easy and fast access to a wide variety of large-scale data sources, allowing for

  • Read more...

    A short guide to US Inflation data

    Highlights of the Dynamic of US Inflation

    The United States has been struggling with a significant inflationary acceleration since the serie of international events, including the outbreak of the COVID-19, war between Ukraine and Russia, the global rise in energy prices, and the collapse of Silicon Valley Bank, among others. All

  • Read more...

    A short guide to Ecuadorian macro and financial data

    Interested in activity, prices, monetary, fiscal, external sector, and financial data for Ecuador? There are loads of datasets, available in both the Central Bank of Ecuador (BCE) and **National Institute of Statistics (

  • Read more...

    A short guide to Chilean macro data

    Interested in activity, prices, monetary, fiscal, external sector, and financial data for Chile? There are loads of datasets, see for example this Repository which has official statistics from INEI and BCRP. However, this short guide will help you find the our "must-see" datasets.

    Chile Country Profile Dashboard

    The starting point is

  • Read more...

    A short guide to Uruguayan macro and financial data

    Interested in activity, prices, monetary, fiscal, external sector, and financial data for Uruguay? There are loads of datasets, see for example this Repository which has oficial statistics from from different sources, including both government statistics and datasets produced by private entities. If you are looking for data about Uruguay you'll