gravatar

iguizar

Isai Guizar

Recently Published

Autoregressive Models
This document introduces the use of Autoregressive (AR) models for time series forecasting in Python. AR models provide a simple yet useful framework to predict future values based on past observations. We begin by estimating the AR(1) model. We then implement a forecast evaluation strategy by splitting the data into training and testing samples, which allows us to assess the model’s out-of-sample predictive accuracy.
Stationary Times Series
Stationarity implies that the statistical properties of a time series are constant over time, meaning that the past is informative for predicting the future. It is a key requirement for ensuring the validity of forecasts based on time series models. In this document, we study standard tests used to assess whether a time series is stationary.
Basics of times series analysis
Key concepts in time series analysis using Mexico’s quarterly GDP data are introduced in this document. We will begin by decomposing the series and visualizing both the original and seasonally adjusted data. We will then explore common transformations to prepare the data for modeling, apply smoothing with a simple moving average to highlight long-term patterns, and finally, introduce autocorrelation, estimating specific lags and plotting the autocorrelation function (ACF) and the partial ACF.
Portfolio Analysis
Portfolio theory, developed by Markowitz (1952), provides a framework for how investors can distribute their wealth to achieve optimal outcomes, while balancing the desire to maximize expected returns and to minimize risk. It remains a cornerstone of modern investment strategies. The objective of this document is to illustrate the principles that underpin this theory by developing an algorithm to obtain optimal portfolios via simulations, starting with a set of only two stocks and later generalizing it to multiple risky assets.
Market Anomalies
Momentum investment strategies involve taking long positions on stocks that show positive momentum (winners) and shorting those with negative momentum (losers). By relying on past information to predict future performance, momentum exploits a market anomaly. In this document I illustrate the strategy by generating a signal to buy (long position) or sell (short position) based on historical information.
Efficient Financial Markets
The description of the efficient market hypothesis (EMH) states that prices in financial markets fully reflect all available information. In this document we study and test the hypothesis, using tickers for the largest US companies by market cap.
Are the financial returns normally distributed?
In this document, we will learn to test the validity of the normality assumption. Then, we will introduce the t-distribution as a more flexible alternative for modeling risk, useful when significant deviations from normality are found, ensuring that our risk measurements better reflect the actual behavior of financial markets.
Extending VaR and ES – The Choice of Confidence Level and Time Horizon
n this document, we will explore how the metrics of Value at Risk (VaR) and Expected Shortfall (ES) change when adjusting two key parameters: the confidence level and the time horizon.
Intro to Risk Measures in Finance
Risk measurement is a fundamental aspect of financial risk management. Two widely used measures are Value at Risk (VaR) and Expected Shortfall (ES). These measures help to quantify potential losses and inform risk management decisions. I introduce the two measures in this document.
Modeling Credit Default in Python
Creditors invest significant efforts in creating algorithms to predict the likelihood of a customer defaulting on a loan (PD). Defaults can result in substantial financial losses, impacting both the profitability and stability of financial institutions. To mitigate these risk, it is essential to develop robust predictive models that help to identify potential defaulters before credit is granted. Our aim here is to develop such models.