sss
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import pywt
# Load the AirPassengers dataset
url = 'https://raw.githubusercontent.com/jbrownlee/Datasets/master/airline-passengers.csv'
data = pd.read_csv(url, parse_dates=['Month'], index_col='Month')
time_series = data['Passengers'].values
# Apply Wavelet Decomposition
wavelet = 'db4'
coeffs = pywt.wavedec(time_series, wavelet, level=4)
# Extract Approximation Coefficients (Stable Component)
cA = coeffs[0]
# Reconstruct the Stable Signal
stable_signal = pywt.waverec([cA] + [None] * (len(coeffs) - 1), wavelet)
# Align the length of the stable signal with the original time series
stable_signal = stable_signal[:len(time_series)]
# Plot the Original Time Series and the Stable Signal
plt.figure(figsize=(14, 7))
plt.plot(data.index, time_series, label='Original Time Series', color='blue')
plt.plot(data.index, stable_signal, label='Stable Signal (Approximation)', color='red', linestyle='--')
plt.xlabel('Date')
plt.ylabel('Number of Passengers')
plt.title('Original Time Series vs. Stable Signal')
plt.legend()
plt.grid(True)
plt.show()
"You have completed both a BSc and MSc in Industrial Engineering, which is quite different from the banking sector. What motivated you to apply for a role in the Metrics and ALM Treasury team, and how do you feel about transitioning into this industry? Are you comfortable with the challenges this shift might bring?"
Q: Can you explain the difference between a list, a tuple, and a dictionary in Python?
A:
- List (
list
): Ordered, mutable (can be changed), allows duplicates. Example:[1, 2, 3]
- Tuple (
tuple
): Ordered, immutable (cannot be changed), allows duplicates. Example:(1, 2, 3)
- Dictionary (
dict
): Unordered (before Python 3.7), stores key-value pairs. Example:{"key": "value"}
Q: How would you filter a DataFrame to keep only rows where the column “revenue” is greater than 100,000?
A:
Use pandas filtering:
You have completed both a BSc and MSc in Industrial Engineering, which is quite different from the banking sector. What motivated you to apply for a role in the Metrics and ALM Treasury team, and how do you feel about transitioning into this industry? Are you comfortable with the challenges this shift might bring?"
Key Takeaways:
- In December 2024, ALMT models demonstrated solid predictive accuracy for the 1-month horizon but delivered mixed results for the 3-month horizon.
- The SARIMA model underperformed, showing a 6 basis point (bp) difference from actual results for both Headline and Core CPI.
- The LSTM model had inconsistent performance. Although it struggled with Headline CPI, it performed well for Core CPI, maintaining a difference of less than 10 bp from the actual figures.
All Item CPI:
- For the 1-month forecast, ALMT predicted CPI YoY at 2.82%, falling 6 bp short of the actual value. This still outperformed GM360 (2.7%) and Inflation Swaps (3%).
- For the 3-month forecast, ALMT projected a rise to 2.3%, which was 5 bp below the actual figure. This underperformed compared to GM360 (2.58%) and Inflation Swaps (3.2%).
Core CPI:
- In the 1-month forecast, ALMT predicted Core inflation at 3.3%, underperforming GM360 by 5 bp.
- In the 3-month forecast, ALMT estimated Core inflation at 3.15%, outperforming GM360 (3.14%) by 1 bp.
Overall Performance in December 2024:
- The models showed mixed results. While the 3-month model failed to capture the significant increase in Headline CPI, the Core CPI model performed well. The MM model also continued to perform strongly, with only a 6 bp difference for both Headline and Core CPI.
Commentaires
Publier un commentaire