Hands On: Exploring CDS in Brazil with Alphacast

Hands On: Exploring CDS in Brazil with Alphacast

By Martina Mas (mmas@alphacast.io)


Find out more Alphacast Highlights here


It is widely known that Credit Default Swaps (or CDS) provide a way to gauge financial stability and solvency of both companies and countries. Analyzing changes in CDS premiums can provide important indicators of market expectations. In brief, Credit Default Swaps (CDS) are financial derivate that operate similarly to insurance contract: a buyer pays a premium to a seller in exchange for protection against the security's risk of default.

The data belonging to this derivative is collected in our Credit Default Swap dataset for a wide range of countries. Alphacast's auto-update functionality ensures that our subscribers will have access to the latest data. We empower them to be one step ahead of the market.

Step by step

First af all, in order to create a pipeline in Alphacast start by clicking the "create new" button and selecting the pipeline option. As it's shown by, it is necessary to select a repository to store it in. Aditionally, keep in mind that public repositories are allowed to be editing by anyone, while private repositories limit these kind of modifications. Also avoid including sensitive information in the name and use a consistent naming convention for easy organization.

image.png

Once you've completed the first step, proceed to fetching a dataset. In this case, you need to select the option Fetch Alphacast Dataset and then enter the dataset name "Markets - Global - Credit Default Swap".

image.png

In this example, we will require data specifically related to Brazil and United Stated expresed in USD and 5-year maturity CDS. To achieve this, click on Add step and select the Filter Entity option, which will be used twice to filter by currency and maturity.

image.png

The most appropriate method to display each column showing values of 5-year maturity in USD for each country separately is by using Long to Wide (unstack). To achieve this, select "country" under the Unstack entity option, and then select "value" in the second window. Now observe how the data changes from being displayed this way to this other way.

image.png

The following step may not be necessary in all cases, but it is a tool for filling the missing values in United States data. To do this, we add Calculate Variable step, give a name to our new variable (in this case we choosed "Value United States - Completed") and use the backfill formula to fill in missing values using the reference of 180 periods preceding.

image.png

Once have been completed the time series for the United States, it's possible to calculate the absolute variation of Brazil versus that country. This new variable is simply calculated as the difference between the values of 5-year maturity in USD for Brazil and the same but for the United States.

Now it's time to visualize our processed information in a chart. To do this, we add the Create a Chart step. First of all, the columns that will appear should be choosen. Then press "Save" to see a first version of the chart that you can customize according to your preferences. image.png

For better understanding, we suggest ordering your chart in the following way: using bars to show the CDS of the United States and Brazil-United States difference, while using a line graph to display the value of Brazil's CDS. This can be done by clicking on "Basic" and going to the "Configure Variables" section. By expanding each variable, the available chart options are displayed: line, bar, or area.

image.png Finally, you can further customize your chart by choosing a title, selecting the time periods from start to finish, changing the names of the variables, choosing your preferred color scheme and many other personalized options. With Alphacast, the possibilities for chart customization are virtually endless, allowing you to create stunning visual representations of your data that perfectly suit your needs and preferences.

Martina Mas

Written by

Martina Mas

This repository compiles the contributions of the Alphacast team on various current topics in the global economy.

Alphacast

Part of

Alphacast

Related insights