Updated: Sep 1, 2020
Data science is fundamental to financial analytics, through the analysis of time series with company data and macroeconomic data, it is possible to make more assertive scenario forecasts and thus reduce expenses and losses due to forecasting errors. These scenarios are fundamental to the development of strategic business planning.
Financial Analytics must be implemented in conjunction with the company's internal management model, data science alone is not enough for decision making, it supports the development of the company's strategic management model.
Generally, this financial analysis is carried out with a strategic management model such as the Balanced Scorecard model.
The Balanced Scoredcard is a methodology for measuring and managing performance with methods used in the management of the business, services and infrastructure that are normally based on established methodologies that can use IT (information technology) and ERP software (Enterprise Resource Planning) as support solutions, relating it to service management and guaranteeing business results. The steps of these methodologies include: definition of business strategy, business management, service management and quality management; steps implemented through performance indicators.
In addition to the traditional internal goals of the organization, it is essential to analyze the large sets of macroeconomic data that are widely available on the market and we will show how data science can automatically capture these indicators so that they can be considered within the development of the Balanced Scorecard.
Our objective is to present tools for forecasting macroeconomic scenarios, based on data from public time series, that facilitate decision makers during the strategic planning of their business as the Balanced Scorecard model.
The macroeconomic contexts generate different interference according to the context of each business, therefore, our approach will be directed only to the tools of extraction of macroeconomic data.
These are some examples of some macroeconomic indices that can be considered during strategic planning.
• Unemployment Rate
• Currency appreciation indices
• Interest rates
• Stock Exchange indices
With integrated financial analysis, organizations will obtain the maximum possible value from their investments in ERP, SCM and CRM. We will use for Financial Analytics, the open source programming language tool R.
- STOCK EXCHANGES
In the chart below, we have an example of collecting data from the Apple historical series on the NASDAQ stock exchange, where we use the programming language R.
These types of analysis are important if your company has any type of direct or indirect economic relationship with this specific segment or company, this market information is an example of how these indicators will support decision makers during the development of the Balanced Scorecard .
For example, if your business is an Apple supplier or companies that have a business relationship with Apple, it is important to consider Apple's stock trends in your company's Balanced Scorecard.
Below are some descriptive analyzes that we can verify in the historical series and their respective scripts in programming language R, which allows the automation of the process in a safe and practical way.
#Reading the data set from the public web repository getSymbols ("AAPL", auto.assign = T)
# Viewing the dataset > head (AAPL)
# Viewing the highest quote value aapl [which.max (aapl)] 2012-09-19 694.86
# We can see that the minimum loss amount was 51.86% summary (coredata (ret_simple)) ret_simple <- diff (aapl) / lag (aapl, k = -1) * 100 > summary (coredata (ret_simple)) Min. 1st Qu. Median Mean 3rd Qu. Max. -51.85888 -1.32475 0.07901 0.12527 1.55332 13.91131
# Checking the day when the biggest loss occurred. A quick internet search shows that on the day that the loss occurred, Apple announced a reduction in profits, with values lower than expected by the market. You could add this information to your Financial Analytics, along with economic indicators from your own company and / or from other competing companies.> ret_simple [which.min (ret_simple)] 2000-09-29 -51.85888
# Viewing the return, we clearly had an outlier, which impacts the average return on Apple shares. The histogram graph shows us that the average return is about 0. > hist (ret_simple, breaks = 100, main = "Simple Returns Histogram", xlab = "%")
# Plot of daily price and volume for different periods chartSeries (AAPL)
# Log returns (useful for viewing variancas) # after using this function, you have to generate the initial code to exit the log AAPL <- diff (log (AAPL), lag = 1) AAPL <- AAPL [-1] plot (AAPL, main = "Daily Closing Prices for the AAPL Index", col = "red", xlab = "Date", ylab = "Return", major.ticks = 'years', theme = "black", minor.ticks = FALSE)
This series below helps us to visualize the fluctuations in the daily closing price of the stock market.
Now we are going to discuss about the US unemployment data from FRED (Federal Reserve Economic Data)
This type of macroeconomic analysis is important in the company's strategic planning. In cases of unemployment trend, consumption decreases and this information can be vital for planning. On the other hand, a very low unemployment rate can make it difficult to attract labor and can increase the cost of the payroll.
# Plot of monthly unemployment rate chartSeries (UNRATE, theme = "black")
As we can see in the historical series above, unemployment peaked during the pandemic of invite-19.
The macroeconomic analysis of unemployment is important for the context of strategic investment planning in the Balanced Scorecard, as high unemployment is correlated with the decrease in consumption.
Another important indicator is the interest rate, the need for capitalization and new financial contributions, most of the time it is an alternative to capitalize the business and make new investments possible when the company does not have its own capital, with this information the company can calculate if it would be it is more viable to sell part of the shares to capitalize or else make a financial contribution through a loan, therefore, it is essential to consider this indicator which, depending on the company's strategy or possible unforeseen scenarios, can become an important expense for the company and therefore needs to be considered in financial analysis, as any noise can compromise the return on investment.
Below we extract the historical FRED interest rate.
> getSymbols ("DEXUSEU", src = "FRED")  "DEXUSEU" > head (DEXUSEU) DEXUSEU 1999-01-04 1.1812 1999-01-05 1.1760 1999-01-06 1.1636 1999-01-07 1.1672 1999-01-08 1.1554 1999-01-11 1.1534 > tail (DEXUSEU) DEXUSEU 2020-05-08 1.0854 2020-05-11 1.0818 2020-05-12 1.0864 2020-05-13 1.0837 2020-05-14 1.0800 2020-05-15 1.0816
# Adjusting the result with log calculation USEU.return = diff (log (DEXUSEU $ DEXUSEU)) chartSeries (DEXUSEU, theme = "black") chartSeries (USEU.return, theme = "black")
- DOLLAR QUOTATION
For currency analysis, we selected the American and Canadian currencies to carry out a 2020 time series.
This type of macroeconomic analysis is important in the company's strategic planning, especially if there is a need to import or export, so a sudden change in the exchange rate may compromise the operation. In some cases, this analysis can facilitate raw material purchasing decisions.
For example, in cases of imports and with an upward trend in the exchange rate, a programmed purchase can be made at a fixed rate.
# Getting all coins coins <- oanda.currencies coins > getFX("USD/CAD")  "USD/CAD" > quotes = getFX("USD/CAD",from="2020-01-01", to="2020-05-01", env= NULL)
All these descriptive analyzes already contribute to a first interpretation of the macroeconomic data, this data can be inserted into the company's time series database to make historical series forecasts using machine learning for the planning carried out in the Balanced Scorecard.
As we already have machine learning articles, our focus here was only to approach the importance of financial analytics with macroeconomic indicators.
Although this article does not intend to generate dashboards, it is worth remembering that any and all graphics generated in R and Python programming language, can be generated within dashboard tools such as Power Bi in real time and within Machine Learning platforms, since that all these platforms have compatibility of copying scripts from those languages.
• Risk Reduction
• Increased return on investment
• Reduced losses from unsuccessful investments.