The Analytics activity is the powerhouse of the application. In Analytics, you can find and add time series to a document, create and apply calculations and analyses, and generate different charts and tables. In the following materials you will find more information about the options available here.

Analyzing Data in Macrobond - overview video













Transcript (click to expand)
[01 Analytics - intro]

Once you've found and selected the data to work with the next step is doing something with it the Analytics activity. This is where you’ll be executing calculations, linking your workflow with external resources or tools, and applying customizable chart styles and tables. After watching the video, you should have an idea of which tutorials you want to focus on to help you get started. You’ve heard it before, but it’s worth repeating, getting to know just a few of these features and tools will make a big difference to how effectively you work right from the start.


[02 Analytics - organization]

The workflow in Analytics is organized from the left to the right: on the left side, you have the Series Browser. Use this to select and add time series to the document. In the middle, you have the Analysis Tree this is where you work with the data you have added. Here, on the right, you have the Presentation area where your work is visualized, either as a table or chart .


[03 Series browser - databases]

Let's start in the Series browser, here you can select and view all the databases available in Macrobond. At the top you have the Economics database, listed in terms of the different schemas you can use to navigate the data. The Economics database is primarily comprised of local and national sources of data, collected by Macrobond. The different schemas, or database views, include category, country, region and source. Scrolling down further, you’ll see third-party databases from of a wide array of data aggregators, such as Eurostat, IMF, OECD and World Bank, to name a few – we call these complementary databases.


[04 Series browser - structure]

As you see, the data is organized using a tree structure, made up of primary and sub- categories of data. When you select the sub-category the application will generate a list of the available series for that category below.


[05 Series browser – adding series]

Alternatively you can use the Search field. This will return results are in order of relevance.


[06 Series list – the purpose]

Opening the series list allows you to make sure the series are in a comparable format and adjusting various parameters if necessary. The parameters for adjustment are frequency, observations, missing values, currency, date range, conversions and forecasts.


[07 Analysis tree – Add analysis]

Once you've made the necessary adjustments in the Series list, you can go ahead add analyses. For that you'll use the Add function - over here - which allows you to select from a range of different analyses and presentations. Every calculation or presentation that you select is then added as a new branch in the tree structure, which also means it'll define the output of the branches below it.


[08 Analysis tree – Insert analysis]

While the add button always results in a new branch being added to the end of the tree, using Insert allows you to choose where in the tree you would like to insert a calculation.


[09 Analysis tree – Undo the changes]

Easily undo changes with the standard Ctrl+Z key command, or select Undo from the Edit menu.


[10 Analysis tree – summary]

Using the Analyses tree is a powerful tool to help you see and understand the effect of each new analysis on the sequence of calculations.


[11 Formula language]

You can also perform various analyses using the formula language. Use this if you want to have more flexibility to customize the calculations you apply. The formula language can either be applied to the start of the tree or to a particular section. Here, we are going to recreate a year on year percentage change for industrial production.


[12 Using Macrobond data and analyses in other application]

The last point for this video is that Macrobond data as well as analyses can be very easily integrated with the variety of third party tools for further analysis.
At this point you should have a good idea of which options you have for analyzing data. Have a look at the Analytics section in the Curriculum for step by step guides on the cases we went through in the video.



What is the analysis tree?

The analysis tree is made up of three different elements

  • The series list, which includes all the data you add to a document
  • The calculations you have applied to the data
  • The presentation styles you have selected to visualize the data

Purpose

You use the analysis tree to apply, organize and access these elements in developing your document. By adding or inserting different nodes in the tree, you can apply a variety of analyses and presentations to a dataset, collected in a single document.

How to structure the analysis tree

As you can see in the picture above, you start with the series list, which is always the root node. You then apply one or more parent nodes containing calculations, or presentation styles. The output of each node is dependent on the preceding nodes it is grouped with.

The structure defines the output

The way you structure the analysis tree affects the output of the document.
We can look at the difference between using add and insert to illustrate how the order of the nodes affect the final output of each node grouping.

Using the Add button

The output of the node you add will act as a function of the node you highlight.

Define which node should be added to by selecting it in the tree.

The new node, Regression, is placed at the end of the tree, as a new branch of Rate of change, the node that was selected.


Using the Insert button

The output of the node you highlight, will act as a function of the node you insert.

Define which node should be acted on by selecting it in the tree.

The new node, Lag, is inserted above Time chart, the note that was selected. Consequently, Time chart becomes a branch of Lag, the node that was inserted.


NOTE:

Any new nodes will be acted on by all of the nodes above, within the same grouping. When deciding where to add or insert a node, you should keep in mind that the order of your calculations is important.

In the video that follows we’ll demonstrate the topics covered here in more detail.


Working with the Analysis tree - video












Transcript (click to expand)
[01 Add vs Insert Introduction]

Simply put, the Add and Insert buttons allow you to select which calculations and presentations you add to the tree, as well as where you place them in the tree structure. Every new node added to a grouping acts as a function of those that are above it. Don’t worry if this isn’t perfectly clear to you at this point, you will understand it better as soon as you see it performed. If you haven’t read the short article introducing the analysis tree, it is worth doing so before going further. You’ll find a link to open it on the page above this video.


[02 Add button]

We’ll start by looking at the Add button. Let’s select the Series list, and then click on Add. In the list, you can select from different presentations and calculations to apply. They are organized by category.


[03 Add drop down menu]

Alternatively, you can right-click and select Add from the menu. To select something quickly simply start typing the name, Rate of change for example, and press Enter once it is highlighted.


[04 Defining a calculation]

Now that you’ve selected an analysis from the list, you’ll need to define various parameters for the calculation, here.


[05 Implications of adding an analysis]

Using the add function results in a new node being added at the end of the tree. In this example, the rate of change calculation was added as a node of the series list, after the time chart. The time chart will not be affected by the rate of change calculation.


[06 Illustrating the analysis with a chart]

So, if we want to visualize the Rate of change calculation we need to add a Time chart node to Rate of change. Select the node you want to add to, click on Add and then on Time chart.


[07 Insert button]

If you want to apply an analysis before an existing node in the tree you can use the Insert button. Unlike using Add, the analysis is placed above the highlighted node.


[08 Inserting an analysis]

Let’s say you want to calculate a six-month Moving average, but you want to apply it to the data before the Rate of change calculation. Simply click on Rate of change, click on Insert and then select Smoothing. The Moving average will now be calculated before performing the Rate of Change analysis.


[09 Implications of inserting the analysis]

As you can see from these two examples, it’s important to make sure that you select the correct branch before using Add or Insert, as well as paying attention to how you’ve organized the calculations and presentations in the Analysis tree.


[10 Other options]

At this point you should understand how to use the Analysis tree to create a document. In the materials that follow, we’ll cover some of the other options you have for making changes to the Analysis tree, as well as an overview of what the different analyses and the lists are used for.




Additional options within the analysis tree
Re-organizing the analysis tree

As you know from the earlier materials, the order in which you organize the analysis tree affects the way the data is calculated and visualized. Each branch acts as a function of the branch it is added to. For example, adding a forecast after a rate of change calculation implies that the forecast will be calculated based on the rate of change calculation above.

The following commands will help you adjust the tree structure so that you get the desired result.

Context Menu Functions

Besides Add and Insert there are a few more functions available via the context menu. These will help you make changes to the structure of the analysis tree.

  • Move up
  • Rename
  • Duplicate
  • Delete
How to:

Move up


  1. Click on the branch you want to move to open the context menu
  2. Select move up

The rebase calculation will now be applied to the data after the smoothing calculation.


Rename


  1. Right click on the branch you would like to rename, or press F2
  2. Type in the new name, and click OK

Renaming is a useful for quickly being able to identify the correct branch, when building documents with a large analysis tree.


Duplicate


  1. Right click on the branch containing the segments you would like to duplicate
  2. Select Duplicate from the context menu, or use the keyboard shortcut Ctrl+2

By duplicating an entire block of calculations, you can quickly generate a new chart from the same dataset and calculations, in order to compare different aspects of the data.

For example, different periods of time, as shown in the example below.




Delete


  1. Right click on the branch you want to delete
  2. Select delete from the context menu
  3. Use the keyboard shortcut Ctrl+Z if you want to undo this

To avoid accidentally deleting an entire block of calculations the command is only executed on the highlighted branch. That is, each branch must be selected and deleted separately.



Using the Series list

As presented in the Overview video for this section, in every Macrobond document you build, the analyses and chart presentations you apply to the data are added to a tree schema - called the Analysis tree. What we are going to look at now is the first branch of the analysis tree, the Series list. Any changes you make to the series list will influence the analyses and presentations that follow.


NOTE: If you are already familiar the features of the Series list and are interested in using a specific setting, select one of the how to guides from the links below.

The Series list is the first node of the Analysis tree, and opens to the right to show all the data. The purpose of the Series list is to prepare the series for further analysis and presentation by converting all series to a common calendar and filling in missing values. You can also convert series to a common currency, add forecasts, and set a data range.

Series name and description

Series added to a document are listed in the Series List, and are comprised of two components.

  • The series name provided in the Expression field e.g. eubank0133
  • The description e.g. Euro Area, ECB Consolidated Balance Sheet & Flows of MFI Sector, Eurosystem, Total Assets & Liabilities, All, EUR
The order of operations

When making modifications to the data in the series list, certain operations are necessarily prior to others. Please bear this in mind as it will affect any further changes that are made.

Whether you perform all, or only a few of the modifications available, you should proceed in the following order:

  1. Add forecasts to the relevant series in the list
  2. Select how missing values will be treated
  3. Select the currency conversion
  4. Select the frequency, and if necessary a method for frequency conversion
  5. Apply the data range, to limit all the time series to a specific range of time.
  6. Apply formulas to the various series in the list.
Series information

You can use the Series information tab to check metadata information for series you have selected in the series list. This is an easy way to check series metadata without having to leave the analysis tree.

Formula editor

Use the formula language to customize your calculations beyond the options available via the analysis tree.

Open the formula editor by clicking on the ‘fx’ button, to the right of the series name in the expression field. The name of the series in that field will automatically be added to the editor.

You'll find a selection of formulas in a list to the right of the editor.


Adding forecast values to a series
How the forecast feature works

When you’ve selected multiple series to use in a document, the application will make some adjustments to the series so that you can work with a common set of observations. The first parameter that is taken into consideration in this process is forecasts.

The forecast function allows you to add future values or change historical values of the time series you’re working with. When performed in the Series list, the forecasts will be applied on the series before any frequency, currency conversion or formula calculations have been applied. In other words, forecasts are applied to the raw data of selected time series.

Forecasts can also be added to the series used to calculate a currency conversion – as in this example using the Central Bank Balance Sheet for Euro Area, Japan and USA.

If you want to apply a currency conversion to a series you’ve added forecasts for, you can also add forecast values to the exchange rate series that will be used. If you don’t, the application will simply use the last value available for the exchange rate series.

How to add forecast values

  1. Select and add the series you want to work with, to the series list
  2. In the Series list select the forecasts tab
  3. Click on the edit button to open the edit forecast dialog box
  4. Select a value method
    • absolute values
    • absolute differences relative other values
    • percent changes relative other values.
  5. Select a date method
    • points in time
    • number of years since the previous forecast or value
  6. Select the scale to make it easier to enter forecasts for series expressed in millions or billions.
  7. Add new values to the relevant columns shown
  8. All added values will be shown as forecasts in the chart, using 50% opacity
Keep in mind
  • Forecasts are added using the original frequency of the time series
  • Changing the frequency of a document will result in a frequency conversion of all series values, including forecasts
  • Define how empty values should be treated, under Missing Value Representation in the conversion settings tab
  • If you want to apply forecasts after performing a calculation on the series, rather than adding forecast values to the raw data, select the forecast option from the list of analyses, in the analysis tree.


Changing the frequency of a series
How does frequency conversion work?

When working in the series list to prepare your series for analysis and charting, frequency settings should be applied after forecasts, missing values and currency conversion.

Frequency settings are applied to the entire document so that all series are converted to the same frequency. This ensures consistent and comparable calculations and presentations of your work.

Setting the frequency is a two-step process, in which you select the relevant frequency, and then the conversion settings that will be used to convert the series to a common calendar.

Automatic frequency selection

When you have multiple series in the Series list their frequencies are automatically synchronized to match the series with the highest frequency. By default, the frequency conversion method is based on the types of series that are being converted.

The chart below contains time series that initially had different frequencies and were automatically converted to the highest common frequency. As you can see, the result is that one of the graph lines (blue) has become jagged.

Stock series, like this one, are automatically converted using the setting, same, which means that the monthly value is repeated for each weekly observation.

Manual frequency settings

You’ll find the frequency settings by clicking on series list. The settings panel list of series will be displayed in the presentation window to the right.

To manually adjust the frequency of the series in a document you can adjust three parameters

  • The frequency you want to apply to the document
  • The conversion method used, and whether it is applied uniformly to all the series, or defined separately for each series
  • And if necessary, what method to use to deal with missing values
How to change the frequency from higher to lower
  1. In the frequency drop-down list select a frequency, for example, Lowest (monthly)
  2. Click on the conversion settings tab, and select a method for converting the series to a lower frequency
  3. Click on the relevant presentation in the analysis tree, time chart for example, to see the result.

As you can see in the chart below, all the series have been converted to a monthly frequency.

How to change the frequency from lower to higher

Changing the series to a higher frequency is the same process as before. As you can there are several different methods that can be used to smooth the jagged appearance of the blue series in the first chart.

For the chart below, linear interpolation was used to create a line of weekly points between the original monthly values, creating a smoother appearance of the line.

Applying frequency conversion after applying analyses

Frequency conversions made in the series list will be applied to series disregarding any proceeding analyses applied in the tree. Any existing analyses will be recalculated based on the frequency settings applied. However, if you want to change the frequency after applying analyses to the series, you can add or insert a frequency analysis to the analysis tree instead.



Currency conversion

If you’re working with series expressed in a variety of currencies it can be helpful to convert all the series to a single currency. In Macrobond there is a an automatic currency conversion feature you can apply to your entire document. Because of the metadata associated with series expressed as a currency you don’t have to worry about the calculations being performed on any non-currency series. This article focuses on the process behind this functionality.

How are exchange rates determined by the application?

Before taking you through some examples of performing a currency conversion, it’s worthwhile familiarizing yourself with the underlying functionality. This will give you a better understanding of the calculated values you work with. Below we’ll look at which parameters are considered, and the method of conversion, depending on the available data for the action.

Relevant parameters
  • The frequency of the input series
  • The currency the series is expressed in

Options for conversion
  • The application will search for a direct exchange series to calculate the conversion.
  • The application will find an exchange rate series that requires the fewest possible steps to calculate the conversion. Currently all exchange rate series used in Macrobond are specified with USD as the base rate, so in practice most of the exchanges are done via USD.

Series frequency

Finally, the application will search for a series that matches the frequency of the document. Often a document will have series with multiple frequencies. In this case the application will select an exchange rate series with a higher frequency, and uses the first observation of the period to perform the conversion.

Conversion of daily series

In the image below we’ve selected three daily series, to convert to USD. In this case a matching daily series, in USD, will be used to perform the calculation, as per the information above.


Conversion of monthly series

In the next image you can see the conversion of a monthly series to USD. Because the converting series is a daily exchange rate series, the application will simply select a single observation to make the conversion, typically the first available for each monthly period.


Applying a currency conversion to a single series

Using the currency conversion feature in the series list will convert all the appropriate series in your document. However, if you only want to convert select series in your document, use the fx button to access the formula language. This will allow you to apply a formula to divide the series in question by a suitable exchange rate series. You’ll find more information and tutorials on using the formula language here

See which series was used

If you want to know exactly which series was used to perform the conversion, you can navigate to the forecast tab in Series List. As you can see in the picture below, the FX series used for currency conversion are listed in addition to those added to the series list.

If your series contain forecasts, you can also add forecasts to the series used for the currency conversion. Learn how to add forecasts here



Setting the time range for your data

With the exception of the formula editor, Data range is the last parameter the application will take into consideration in preparing your series for analysis. Prior to this point, all your series have been converted to a common calendar of observations, and include the full history of each series. If your analysis requires that all series have the same start and end date you can use data range to specify these dates.

However, if you simply wish to specify the start and end dates for your chart, you can do so by dragging the x axis to the desired points in time.

Important information
Using the Data Range will cut the history of the time series. The full history will no longer be available in the document and might affect calculations. For instance: in the picture above, US Industrial Production (usindprod) starts in 1919-01-01. If you set a Data Range from 1950-01-01 and then calculate a Year-on-Year % Change, this series will now start in 1951-01-01, as one year of the series history is needed to calculate Year-on-Year % Change. The history before 1950 will not be available anymore and thus not used in the calculations.

There are two other ways to specify a time range:

  • Frequency Conversion – useful when you want to apply it to a specific block of analyses
  • Formulas – useful when you want to apply it to specific series.


Editing Series Descriptions

In the series list you’ll see the time series described relative to data attributes, such as:

  • Region
  • Category
  • Series title
  • Inflation adjustment
  • Seasonal Adjustment
  • Unit

The series descriptions are automatically used in charts, either in the heading or in the chart legend. You may want to change these descriptions manually, especially if they are too long.

How to edit the descriptions

There are two options for editing descriptions: a simple edit and an advanced edit.


Simple edit
  1. Double click on the description in question, in the Series list
  2. Type in the desired description in the dialog box that appears
  3. Click OK


Advanced edit
  1. Click once on the series description to highlight it
  2. Navigate to the presentation properties in the command bar, above
  3. Select an option from the drop-down menu
    • Automatic – will use the default series description
    • Custom – select this and click on edit to modify the text manually
    • Expression – applies the Macrobond time series code
    • Reference – will use the default series description, to which you can add custom text that will be used in the chart legend

Please bear in mind that the description entered in the Series List will later be used in the document across all of its functionalities and in the chart titles and legends.



The Series Information Tab

When you are working on a document in Analytics, you can use the series information tab, in the series list to check reference information, or metadata, about the series you have selected. You’ll find metadata on the following topics:

  • Title
  • Source
  • Frequency
  • Start date
  • End date
  • Last value
  • Name
  • Region
  • Unit
  • Currency
  • C.o.p. %
  • C. o. p.

Keep in mind that the information is about the raw data, and will not reflect any calculations you might apply.

Customize the list of information

You can customize which categories of series information are displayed under this tab.

  1. Right click on any table header, and click on select column


  2. Tick or un-tick the relevant categories.
  3. Select whether you would like these changes to be applied as your default, or only used in the current document.


Features in the context menu

Right click on any series to access the context menu for additional features.


Change region

This option allows you to change which region a series is for.

  1. After clicking on Change region in the context menu a dialog box will open
  2. Click on the drop-down menu on the left to select which region you want to change to



Used in

The blue square symbol to the left of a series indicates that the series has been used in one or more documents saved to your accounts.

  1. To view the information, click on Used in, in the context menu
  2. You’ll see the various accounts where documents containing the same series are stored
  3. Hover over one to view the documents, and click to open them



Favorite a series

Favorite series, indicated by the star symbol, allows you to save certain series for easy access.

  1. Select which account you want to save the favorite to
  2. Add any important information in the comments field and proceed




Customizing your workspace

The workspace in analytics is divided into four different segments, the Series browser, the Analysis tree, Presentation area, and Command bar. You can adjust the size and/or visibility of these segments to suit your needs.


Maximize the presentation area

Use Ctrl+M, or select the relevant option from the View menu.

To return to the normal size just use the short cut again, or deselect the relevant option in the View menu.


Adjust segment sizes

The Series browser, Analysis tree, and Presentation area can be made wider.

Drag the vertical margins separating them to the left or right

The next time you open the application the sizing will be the same.



Hide segments

You’ll see pins on the top right corners of the Series browser and Analysis tree.

Click on the pin to dock the segment you want to hide to the left of the workspace.

Click the hidden segment to access its features.

If you want to fasten the hidden segment in its original position, click on the pin again.

You can also use the view menu to hide these segments, as well as the command bar.

Managing time series in a document

Adding and removing time series - video

Unless you know exactly which series you want to look at, building a new document is often a trial-and-error process of finding the data that works best. Learning about the different options to add and remove time series from a document will ensure that this process is as quick and effective as possible.

Recommended reading prior to this section
  • Macrobond Key Series names
  • Locating series in the Tree
  • Actions group








Transcript (click to expand)
[01 Introduction]

In this video, we’ll look at three different ways to add time series to a document, as well as the different options to remove series, either from a document or simply from a chart.


[02 Adding a time series in the Browse and Search Activities]

When building a document in Analytics, the first step is to add data. We’ll start by looking at how to add time series from other activities like Browse or Search. Once you’ve found the series in question, click on it to activate the Analytics group in the Actions tab of the command bar. As you can see here, you can either add the selected series to a new document, or to an active document.


[03 Adding a time series in the Analytics tab]

You can also add series directly from within Analytics. Navigate through the tree and select the relevant category. From the list of time series generated, you can select a single series by clicking the plus button, here, or directly by double clicking on the series. If you want to select multiple series at once, you can use the Ctrl button, and then click here.


[04 Adding a Key series code to an Expression field]

The third way to add time series to your document is by typing the series code into the expression field of the series list, here This is the quickest way to add key indicators, as they have simpler codes. These codes are constructed by combining the ISO country code with a suffix describing the type of indicator. For example, the Consumer Price Index for the United States.


[05 Removing the series from a chart]

Since a single document may contain more than one chart, it’s important to distinguish between removing a series from a particular chart in your document, and removing the series from the document entirely. To remove a series from a chart, simply right click on it in the chart and select delete. If we take a look at the Series list now, we’ll see that the series is still there, and can be used in other analyses and charts.


[06 Removing the series from a document]

To permanently remove the series from the document, right-click on the series in the Series list and select Delete. This action will delete this time series from the document, including any analyses or charts it was used in.




Document Series: A quick-add function for external data
Recommended reading prior to this section
  • Adding and removing time series
  • Series list

Every now and then you might want to use a non-Macrobond series in your analyses, for a one-off calculation. In cases like this, we have a function that allows you to quickly add an external series straight to your document. These are called document series. In this article, we’ll go through how to use the document series feature.

About document series

The Document series tab is located in the series list. Series you add via this tab can only be used in that particular document. There are two options for adding series this way:

  1. Manually enter the values & dates
  2. Copy time series from a document, and paste
How to add document series

Manually enter the values & dates

  1. Click on the document series tab.
  2. Select the bottom left button called Create document series.
  3. On the left side of the window, add the required information: series name and description. The rest of the settings are optional.
  4. Add all the values in the field provided on the right side of the window. Press enter to create a new line.

NOTE: If you have specified the frequency and start date of the series, you don’t need to enter the dates manually, as the application will automatically assign dates according to those settings.

Paste document series

  1. Copy a time series (values + dates) from a document, for instance an Excel file.
  2. To add the data, go back to the application and click on Paste document series in the Document series tab.
  3. This will generate a window with the values, dates and additional series information.
  4. Make any final changes in the open window and click on save.

NOTE: The application will extract frequency and start date from the information you pasted. To complete the process simply add the series name and description.

Using document series

Document series are only available in the document you added them to. If other users need to access the document, they will need to download the series after opening the file.

A yellow banner will pop up to inform users of this, as well as what to do next.

If you’re planning on frequently working with external datasets, or want to use a series in a number of documents, it’s best to add and organize the data using our two in-house-data functions.



Formulas in Macrobond

Formula language - video

Formula language allows you to perform calculations on time series, without the need to apply each analysis separately as a defined function. It also gives you the flexibility to create tailored calculations. Getting to know this feature of the application will allow you to create more advanced or nuanced analyses in the simplest way possible.













Transcript (click to expand)
[01 Introduction]

In this video about the Macrobond formula language we’ll use the example of calculating GDP contributions to learn about creating a formula, applying it to your data and visualizing your calculations.


[02 Two ways of applying formulas]

There are two ways to create and apply formulas. Either use the Formula editor or the Formula functionality. In this video, we will focus on the Formula editor, which you’ll find in the Series list, by clicking the fx button.


[03 The process]

Once you’ve opened the Editor you’ll see the formula library. To get a description of what each formula is for, hover your cursor over it. Keep in mind that formula calculations will be performed by the application after any of the other changes you make in the Series list. Formulas applied in this way, via the Series list, will be calculated prior to any of the analyses you apply in the analysis tree.


[04 Creating a formula – an example]

Applying a pre-defined formula is quite straight forward, so we’ll go ahead and look at how to combine formulas to create a custom calculation. This is also faster than applying the predefined analyses one at a time. Let’s try this by calculating the contributions to France’s total GDP.


[05 Creating a formula]

Start with the quarterly growth rate of the component at date t. To get the weight at date t-1, you can lag the weight calculation by 1 observation. In the formula language, the length - here 1 - refers to the frequency settings in the Series list. So in this case, 1 means one quarter.


[06 Applying created formula]

Now that we’ve set up the formula, replace the description with the actual time series. In this case we’re going to work with current prices. For the Change in inventories, the formula will look like this.


[07 Duplicating the formula]

At this point you can duplicate the formula for each of the remaining components of the French GDP. Right click on the first expression and select Duplicate. Simply replace the series code to reflect the relevant component.
Once you’ve done this for all the components, the Series List should look like this.


[08 Presenting the calculations]

A classic presentation of this analysis is to have all the contributions in stacked columns and the GDP series as line on top.


[09 Summary]

Learning to use the formula language can save you a lot of time in your analyses. If you go through the follow-up materials on this topic you’ll quickly become familiar with it. If you frequently re-use custom-built formulas, you can save them for future use. We’ll go over how to do so in the next screencast.




Applying formulas: In the series list or in the analysis tree?

The formula language can be used to expand predefined analyses and create calculations that are tailored to your needs. This article explains the differences between creating and applying formulas via the series list, and doing so via the analysis tree.

The main difference between using formulas in the Series list and through the Analysis tree is when the calculation will be applied to the data.


In the series list

If you want to apply calculations to raw, uncalculated data, then you should apply formulas in the Series List.


In the analysis tree

If you want to apply formulas after certain analyses are performed on the data, you should use the Formula feature in the Analysis tree. This will allow you to define at which point in your sequence of calculations the formula is applied.

How to create a formula in the Series list

NOTE: When in the Series list, remember to use the Macrobond series codes to identify the series.

  1. Click on the fx button located next to the series expression field.
  2. Scroll through the list of available functions, or use the filter field to narrow your search.
  3. Double click to select a formula from the list.
    1. If you want to use directly a series code as part of the formula, highlight the code first, that way it will be integrated into the formula once you select it from the list.
How to create a formula in the analysis tree
  1. Start by clicking on the point at which you want to apply the formula in the tree.
  2. Click on Add or Insert, and select Formula from the list to open the Formula editor.
  3. Enter the relevant formula expression in the field.

By default, Include input series as output is checked. This will allow you to select both the input series as well as the calculated series, in any of the analyses or presentations you apply after. When unchecked, the input series will no longer be available as output.

NOTE: The application will automatically assign aliases to all time series to indicate that analyses may already have been applied to the raw data, thus changing the series from its original form. Aliases can be customized, but must start with the prefix “fx:”

Summary

Creating formulas in the series list is helpful when you want to manipulate the data before proceeding with any other analyses. The calculations made in the series list will then affect the entire document.

Using the Formula function in the analysis tree is useful when you want to perform customized calculations after applying analyses in the tree. Those changes can be applied from a particular point in the tree rather than from the start.



Saving custom formulas - video












Transcript (click to expand)
[01 Introduction]

In the previous video on using the formula language, you saw how to create custom formulas. If you’re likely to use the same formula repeatedly you can create a User-Defined Function that allows you to save the formulas you’ve created. You can also share your saved formulas with colleagues for more efficient collaboration.


[02 TUser-defined function]

The user-defined feature allows you to add custom formulas to Macrobond’s Formula Library. In the previous tutorial we looked at creating a formula for measuring contributions to GDP. This is a good example of the type of formula that’s worth saving to cut down on repetitive tasks. So, let’s have a look at how it’s done.


[03 Function editor]

To create a new user-defined formula, click on Edit in the menu bar and select User defined functions. The editor window consists of three sections: on the left you can select from a list of custom functions that have been used in your different accounts. In the middle, you have the formula editing field where you create and save new formulas. And on the right you have the formula library, which you can use if you want to select an existing formula as the building blocks for something new.


[04 Creating and saving a formula]

To create the formula, click on Add, here. Always start with a point or period to differentiate it from standard formulas. Assign a function name to the formula, and then add the variables in parentheses. Then add an ‘=’ sign.


[05 Using the variables]

We’ve named the variables so that it’s easier to identify them, but they can also be called X and Y, for example.


[06 Incorrect formulas]

If any part of the formula is written incorrectly that portion will be underlined in red, with a description of the problem being shown in the text field at the bottom of the editor.


[07 Description]

To finish off the process, add a description for your new formula, in the field above. Then choose a formula group, here and finally, select which account you want to save it in. With these parameters set you should have no problem quickly locating your formula in the library.


[08 Finding and applying the saved formula]

It is easy to find and apply a saved formula. Begin writing the name in the formula expression field. Don’t forget that you need to include the point at the start! Otherwise select it from the formula list on the right.


[09 Summary]

And there you have it. Now you know how build up a library of custom formulas that saves you the time of creating them from scratch for every document.






Return to main page of Macrobond Learning Resources