instruction
stringlengths
15
26.1k
I am trying to calculate the Total Credit Risk capital % for my learning purpose as given below. Assuming adding 1 single loan with different pds. i have noticed one point in the table and have two queries. Point 1: As PD increasing, the highly risky bands gets lower credit risk capital %. Question1: Is ther...
Calculation of Total Credit Risk Capital % but seeing lower capital percentage for higher risk band. Is there any correction required?
I was working through Clark's Commodity option pricing: A practitioner's guide published 2014, and when I get to the Futures case study section 2.3.3, the answers I get differs from his (I tried to find the errata for the book but it doesn't seem to exist). **Summary of problems** 1. Some of his P/L calculation...
Is Clark's Futures calculation incorrect?
I am trying to reproduce the analysis discussed in https://arxiv.org/pdf/cond-mat/9905305.pdf where they use high-frequency data (1-minute frequency) of S&P500 from 1984 to 1996. In particular, they found the log returns for this period follow an exponential decay behaviour for the first 20 minutes with a characterist...
Is anybody aware of any benchmarks for general anomaly detection of intraday or (other time intervals) for stock prices? I suspect that it is difficult to get agreement on what constitutes an anomaly for this kind of data and it will remain an unsupervised problem and involve injection of synthetic anomalies into marke...
Any bench marks for anomaly detection of intraday or other time intervals for stock prices?
## You will not be able to replicate positive decaying autocorrelations in current markets: Due to the increased popularity in high-frequency trading, there's been a likewise increased focus on studying the underlying empirical properties of high-frequency data. One of the stylized facts in high-frequency data is t...
Assume we have two assets, a random stock $S$ and deterministic risk-free bond $B(t) = e^{rt}$. Let $P$ be a model of the real-world probabilities of $S$ and $Q$ the unique associated risk-neutral measure associated to the numeraire $B$ under the no arbitrage assumption. If $P$ is determined via $S$ solving the SDE ...
I understand that stocks' returns are not normally distributed. However, is there any method that we can rescale the stocks' returns so they look more like normal distributions? I come across a few books that mentioned that we can do the volatility rescaled returns but I am not sure how that works in practice. Th...
I am trying to analyse a time series. I want to get only quantitative results (so, I'm excluding things like "looking at this plot we can note..." or "as you can see in the chart ..."). In my job, I analyse stationarity and persistence. First, I run ADF test and get "stationary" or "non-stationary" as results. Then...
I am trying to analyse a time series. I want to get only quantitative results (so, I'm excluding things like "looking at this plot we can note..." or "as you can see in the chart ..."). In my job, I analyse stationarity and persistence. First, I run ADF test and get "stationary" or "non-stationary" as results. Then...
#### A 5-minute sampling frequency is a popular choice when avoiding the adverse effects of microstructure noise: When dealing with eg. estimation of intraday volatility estimates **there is a wide consensus that sampling at a 5-minute frequency** will keep the bias induced by the microstructure noise to a minimum a...
It is important to understand what causes non-normality. Consistent with noob2's comment, it could be attributed to a change in regimes. These regimes cause excess skewness and kurtosis, two properties that are inconsistent with normality. In this regard, one can impose a structural model on the data generating functi...
I understand that stocks' returns are not normally distributed. However, is there any method that we can rescale the stocks' returns so they look more like normal distributions? I managed to find a paper talking about this: https://link.springer.com/content/pdf/10.1007/s10203-018-0230-3.pdf where the author resca...
I understand that stocks' returns are not normally distributed. However, is there any method that we can rescale the stocks' returns so they look more like normal distributions? I managed to find a paper talking about this: L. C. G. Rogers: *Sense, nonsense and the S&P500*, Decisions in Economics and Finance (2018) ...
# Interpretation: The authors shrink the 6 month average of the exponentially smoothed correlations towards the average sample correlation. **Thus your second formulation is correct, in the sense that *equation (1)* already contains shrinkage.** The basis of my statement comes from the derivations below. Here, ...
Has anyone read the paper ["Spread of risk across financial markets:better to invest in the peripheries" by F. Pozzi, T. Di Matteo & T. Aste][1]? If so, how do you interpret equation (1) in the dependency measure subsection of the Methods section? It looks like it produces an average correlation figure: \begin{equa...
# Interpretation: The authors shrink the 6 month average of the exponentially smoothed correlations towards the average sample correlation. **Thus your second formulation is correct, in the sense that *equation (1)* already contains shrinkage.** The basis of my statement comes from the derivations below. Here, ...
There have been numerous headlines the past two years where we learn that quant funds are engaging in algorithmic basis trades (aka relative value trades) between Spot Treasuries and Treasury Futures, and that this is a rather large market ~$1 Trillion. The returns on this arbitrage are of the order of a few bps...
How does Repo enable zero cost leverage?
I'm reading The Intelligent Investor by Benjamin Graham, and I came across the text below. What I don't understand is: if the issues sold at 60 through 1970 but closed at 77 that year, wouldn't that mean they are selling at a premium? **Why does the author say the issues are sold at a discount?** > In 1970 it was...
US bonds par value sold at a discount or at a premium? -- Intelligent Investor book question
In the Intelligent Investor, Graham seems to be very much against buying preferred stock as an individual investor. Graham: > The typical preferred shareholder is dependent for his safety on the ability and desire of the company to pay dividends on its common stock. Once the common dividends are omitted, or even ...
Were preferred stock ever paid after common stock? -- Intelligent Investor question
It is well known that hedging with implied volatility involves a PnL: $0.5*(σ^{2}_r−σ^{2}_i)S^{2}*Γ_{i}dt$ In the Wilmott paper (http://web.math.ku.dk/~rolf/Wilmott_WhichFreeLunch.pdf), they imply that the collective PnL from such a strategy is the integral of above expression across time. However, this seems ...
Gamma PnL when hedging with implied volatility - where is the mark to market PnL?
I suppose this is essentially a literature recommendation. I am looking for a list of exotic/nonlinear/complex features that can be included with bonds/loans/fixed income products. A (somewhat superficial) survey comes up with: 1. callable bonds 2. puttable 3. capped/floored/collared floating coupons 4. o...
taxonomy of bond/fixed income exotic coupon features?
**Not sure that I will go for a 5 min scale for any stocks; it really depends on the liquidity** of the stock. For some 15 minutes is better, and for other 1h or 1:30 hours. Of course it is easy to state this since "liquidity" is not well defined, and could be even be defined a circular way: this time scale is the o...
I have scanned rigorously on the internet but the information regarding the SURE methodology seems surprisingly very little (at least with regard to its application in finance). I would have imagined if Fama French used this technique then, surely there might information on it out there. However, it's the exact opposit...
Is it compulsory to use seemingly unrelated regression method while running the Fama French style 25 portfolios on the independent risk factors?
Suppose we have a stochastic cashflow $X_t$ from a portfolio of contracts with clients. We can simulate from $X_t$ and can calculate $E[X_t], \forall t \in [1,n]$ where $n$ represents the longest maturity of all contracts in the portfolio. The cashflow variability arises from the unexpected behavior of clients since cl...
I have scanned rigorously on the internet but the information regarding the SURE methodology seems surprisingly very little (at least with regard to its application in finance). I would have imagined if Fama French used this technique then, surely there might information on it out there. However, it's the exact opposit...
Difference between real and expected average transaction price of an order?
when using the monthly Fama/French 3 Factors .csv file on the French [data libary web site][1], it is possible to see that the left column includes the monthly excess return of the market (Mkt-RF) and the very right column includes the monthly risk free rate (RF). The latter one is based on the one month T-Bill. Ho...
Are the monthly risk free returns on the French data libary website annualized?
I just want to reassure myself that I understand why Monte-Carlo is the appropriate tool in computing the fair value prices for different options. Let's say we have a Tenor discretization $T_{0}=0<T_{1}< T_{2}$ and some numeraire $N(T_{2};t)=P(T_{2};t)$, i.e. the domestic zero coupon bond that matures at $T_{2}$. S...
How do I find the risk neutral valuation of $P(T_{1})$ und the measure $\mathbb Q^{P(T_{2})}$, where $P(T_{1})$ and $P(T_{2})$ refer to the $T_{1}$ and $T_{2}$ zero coupon bond with $0 < T_{1} < T_{2}$, and $L(T_{1},T_{2},t)$ be the associated forward rate. The forward rate is assumed to be follow lognormal law under $...
So I have compiled the hourly log returns for an asset, and grouped it in columns with each column being one hour's returns. How can I test whether there are seasonal patterns in the returns according to the hour? A GARCH model? Anova? T-test?
In Shreve's *Stochastic Calculus for Finance Volume II*, section 6.5, page 273, Shreve talks about pricing a zero-coupon bond. > A zero-coupon bond is a contract promising to pay a certain "face" > amound, which we take to be $1$, at a fixed maturity date $T$. Prior > to that, the bond makes no payments. The risk-...
The answers to both your questions are connected: the [**article 153**][1] of the CRR defines the computation of the regulatory risk-weight for capital purpose. As you can observe, the formula takes into account the expected loss $LGD\times PD$. In other words, the capital requirements (for Unexpected Loss) focus on w...
I'm trying to download hourly trading volume data via the Bloomberg Excel API. For context, this is the formula I'm using, which pulls hourly trading data for Apple between Dec. 10, 2021 and Dec. 17, 2021: ``` =BDH("AAPL US EQUITY", "VOLUME", "12/10/2021 00:00", "12/17/2021 00:00", "BarSize", "60", "BarType", "T") `...
In recent history, whenever there is a markets crash, we see a sudden market reversal. Some of the sharp reversals when the market changed direction suddenly are: 1. May 2009 2. Last week of December 2018 3. Mid-March 2020 Is there a reliable market indicator that captures the sudden change in market sentiment?
How to identify Market Reversals?
In recent history, whenever there is a markets crash, we see a sudden market reversal. Some of the sharp reversals when the market changed direction suddenly are: 1. May 2009 2. Last week of December 2018 3. Mid-March 2020 Is there a reliable market indicator that captures this sudden change in market sentiment? ...
I am trying to understand how deposits in bank are modelled, and one such modelling approach is replicating portfolio approach as provided in http://www.diva-portal.org/smash/get/diva2:1208749/FULLTEXT01.pdf Below is the excerpt on how to construct a replicating portfolio [![enter image description here][1]][1] ...
I am trying to better understand the sovereign bond market in the eurozone. In particular is it costlier for some institutions to hold periphery country bonds that contain more credit risk than say German bonds? The funding cost for periphery country bonds can be higher due to higher repo haircuts. However, I have u...
I am trying to better understand the sovereign bond market in the eurozone. In particular is it costlier for some institutions to hold periphery country bonds that contain more credit risk than say German bonds? The funding cost for periphery country bonds can be higher due to higher repo haircuts. However, I have u...
In recent history, whenever there is a markets crash, we see a sudden market reversal. Some of the sharp reversals when the market changed direction suddenly are: 1. May 2009 2. Last week of December 2018 3. Mid-March 2020 Is there a reliable market indicator that captures this sudden change in market sentiment? ...
In recent history, whenever there is a markets crash, we see a sudden market reversal. Some of the sharp reversals when the market changed direction suddenly are: 1. May 2009 2. Last week of December 2018 3. Mid-March 2020 Is there a reliable market indicator that captures this sudden change in market sentiment? ...
According to the theory, the market portfolio is composed of all assets weighted by their market capitalization, and this is the portfolio one should own. Is there a way to build a portfolio close to the theory's market portfolio? This would imply owning stocks, real estate, commodities, cryptocurrencies, art, and p...
Can I invest in the market portfolio of modern portfolio theory?
Assume we have two assets, a random asset $A_t$ and deterministic risk-free bond $B_t = e^{rt}$. Let $P$ be a model of the real-world probabilities of $S$ and $Q$ the unique associated risk-neutral measure associated to the numeraire $B$ under the no arbitrage assumption. If $P$ is determined via $A$ solving the SDE...
Currently I'm thinking the effect of margin. When selling an option, you need to pay margin everyday and mark to market. In most exchanges, margin is overcollateralized. But when buying a option, you don't need to pay margin. For an European option, how does margin affect the ask price? Is there any explicate solution ...
I'm reading Dupire's "Pricing and Hedging with smiles" (1993). After arriving $$\frac12 b^2 \frac{\partial^2 C}{\partial x^2}=\frac{\partial C}{\partial t}$$ *(note: here $C$ is the value of a call option, $t$ refers to its maturity, while $x$ refers to its strike)* it says > Both derivatives are positive by ...
Why conversion shows $\frac{\partial C}{\partial T} > 0$?
I am trying to implement a portfolio selection tool based on utility functions. So, I should maximize the expected utility of a given utility function: $$ \begin{align} &\max_{w}\ E[u(W_0(1+w^TR))]\\\\ & s.t.\\ &w^Te = 1, \ e^T=[1,...,1] \end{align} $$ Using the quadratic utility function we get: \begin{align}...
I am trying to implement a portfolio selection tool based on utility functions. So, I should maximize the expected utility of a given utility function: $$ \begin{align} &\max_{w}\ E[u(W_0(1+w^TR))]\\\\ & s.t.\\ &w^Te = 1, \ e^T=[1,...,1] \end{align} $$ Using the quadratic utility function we get: \begin{align}...
I am trying to work through understanding this but I do not know how they got to the solution at the bottom (b*). Any help? [1]: https://i.stack.imgur.com/KVQLF.png
How does this book (Financial Theory w/ Python) arrive at the solution at the bottom?
Suppose you start with zero dollars; and a stock is at \$100 and goes up and down \$1 equally likely, i.e., both with probability 50%. A trend-following strategy, during a period of 31 days, works as follows: 1. If the stock goes up you buy one share and sell it at the end of the 30-day period. 2. If the stock goe...
What is the distribution of the trend-following strategy PnL?
It's true that SOFR is very similar to OIS Fed Fund swaps but for LIBOR conversion I think there will be a lot to it. There will be many differences as the SOFR rate is an overnight rate with no credit risk and LIBOR is a term rate with credit being part of the rate. The differences will show up in cashflow calculation...
Sorry for the basic question, I'm trying to educate myself on algorithmic strategies. Just to see how it works, my idea is to create a simple moving average strategy. Let us suppose I have $N$ observations of the price of an asset $P_t$ I define the simple moving average of $P_t$ at time $t$ $$\text{SMA}_t...
*"What are more appropriate way to test it with real-world data? Also, can you suggest the next steps to make it more realistic?"* Pick a tradable instrument (e.g. SPY rather than S&P500), eliminate look-ahead bias (e.g. trade at the next day's open rather than the close), take into account transaction costs and fin...
*"What are more appropriate way to test it with real-world data? Also, can you suggest the next steps to make it more realistic?"* Pick a tradable instrument (e.g. SPY rather than S&P500), eliminate look-ahead bias (e.g. trade at the next day's open rather than the close), take into account transaction costs and fin...
Suppose I have a volatility model of the form $\sigma=f(X(x,y), Y(x, y))$ where $f$ is some function of the variables $X, Y$ which are calibrated using some calibration procedure with market implied volatilities $x,y$. My question is about the PnL expansion in terms of the Greeks, mainly, vega. Is the vega calculate...
This "market portfolio" is a chimera: very useful for basic reasoning and teaching, but that cannot be traded. Here are three reasons why - the term "market" suggests that it is available on markets, but of course it is not: as you write in the question, **you should invest in a lot of unlisted, hence not public, as...
I have been going through a course for Time Series Analysis. First we learned to make returns from a time-series of stock index by (Xt - Xt-1)/Xt-1 . This makes the series stationary, which means we can run the Auto-Regressive model. It all makes sense until here. Than the returns are being normalized, dividing t...
Does it make any sense to normalize returns?
Only under specific circumstances does $R^2$ have its traditional interpretation of the proportion of variance explained, and out-of-sample is not such a circumstance. However, some kind of standardized measure for regression performance could be more helpful than saying, “Well, boss, we’ve got an MSE of 11.” (I’m n...
[Only under specific circumstances does $R^2$ have its traditional interpretation of the proportion of variance explained](https://stats.stackexchange.com/a/551916/247274), and out-of-sample is not such a circumstance. However, some kind of standardized measure for regression performance could be more helpful than sayi...
[Only under specific circumstances does $R^2$ have its traditional interpretation of the proportion of variance explained](https://stats.stackexchange.com/a/551916/247274), and out-of-sample is not such a circumstance. However, some kind of standardized measure for regression performance could be more helpful than sayi...
If everyone wanted to sell swaps (pay fixed, receive floating) why does that drive down swap rates? Wouldn't that raise rates because in order to compete with each other they would have offer to pay higher fixed rates to get people to take the other side?
If everyone wanted to sell swaps, why does that drive swap rates down?
I am trying to work through understanding this but I do not know how they got to the solution at the bottom (b*). Any help? ![image description](https://i.stack.imgur.com/KVQLF.png)
As far as I know we use Normalization in reviewing the Financial Statements(PnL,Balance Sheets,Cash Flow) of a Company. Now What is that exactly? If the company is seeking external funding, normalized financial statements provide the investor or lender with a clear picture of the actual expenses, revenues, earnings ...
When you buy or sell a financial instrument on a double auctions (ie involving buyers and sellers, for instance in an orderbook), it is straightforward to understand that **when you have more buyers than sellers, the price will, on average, go up** (and the reverse). When **market makers** are in between buyers and ...
I have a portfolio or $N$ assets in $t=10$ days. ``` import numpy as np import pandas as pd n= 10 A = pd.DataFrame([np.random.randn(5) for i in range(n)],columns=['a', 'b', 'c', 'd', 'e']) A T = A.shape[0] k = A.shape[1] print(T,k) ``` The covariance matrix ``` Σ = A.cov().to_numpy() Sigma = Σ pri...
I have previously hit this forum for some guidance on getting benchmark curve members (link below). I have managed to get this working with Bloomberg, but I was wondering, is there any way to reliably get this info across the curve *without relying on Bloomberg*? I have thought to scrape this information directly f...
I want to backtest some portfolios that involve leveraged long term treasury bond funds like [TMF](https://www.direxion.com/product/daily-20-year-treasury-bull-bear-3x-etfs), at least as far back as the 1970s. Since there does not seem to be any T-bond ETFs with history going that far back (and leveraged ETFs have even...
Where can I find historical daily market prices for long term treasury bonds?
So, for the sake of simplicity, ignoring taxes, expense ratio, volatility or anything else other than known values for the following five variables: 1) Starting contribution (dollars) 2) Annual contribution (dollars, deposited at the beginning or end of each period) 3) Starting price of one index fund share (e...
How to simply calculate future value of periodic contributions to an index fund account?
Could someone with option market making experience tell me usually at what frequency do the major option market makers delta-hedge their positions (say for US single stocks or equity indices)? Obviously if the underlying did not move then they do not need to hedge at all and if underlying moves a lot then they need to ...
Here's a rough outline of what you can do: 1. You can retrieve all the historical Treasury auctions via [this url][1]. 2. To make things easier, I recommend that you compute a `rounded_term` for each auctioned issue, which can be calculated as $(\text{maturityDate} - \text{issueDate}) / 365$, rounded to the neare...
Does IRR (and therefore YTM) assume that all cashflows are reinvested at the IRR (or YTM)? If so, how?
Is there a way to get a list of all the holidays published in an exchange calendar without specifying a date range? For example, NYSE has published their holiday calendar up to 2024 and I want to see if I could get all holidays as published in NYSE calendar without the need to do any updates in the script to arrange th...
Does IRR (and therefore YTM) assume that all cashflows are reinvested at the IRR (or YTM)? If so, how does IRR the formula show this?
Suppose I have a model with 2 primary assets, a stock $S$ and a short rate. The stock will be driven by a Brownian motion $W_1$. The short rate will be random and will be driven by a Brownian motion $W_2$. These Brownian motions may or may not be correlated. I want to price a European option call option on $S$. I...
In the Black-Scholes model with stochastic interest rates, what are the 3 assets used to compute measures?
I followed along in the video linked below and wrote the code exactly as he did, but it came up with 8 errors and 2 warnings. Below the video link is a link to the code I wrote by following along with the video. [Chaikin Money Flow - Coding in MT4] [1]: https://www.youtube.com/watch?v=X11h02UVtos [CMF Osci...
I followed along in the video linked below and wrote the code exactly as he did, but it came up with 8 errors and 2 warnings. Below the video link is a link to the code I wrote by following the instructions in the video. [Chaikin Money Flow - Coding in MT4 (Youtube video)](https://www.youtube.com/watch?v=X11h02UVtos...
The [PRIIPs regulation](https://eur-lex.europa.eu/legal-content/DE/TXT/?uri=CELEX%3A32017R0653) does not specify how to compute the VaR-equivalent volatility if $VaR_{Return Space} < -1$. What would you do in the following case? I have the following moments from the historical daily log-returns of a stock: $M1 ...
PRIIPs KID: if VaR (Return Space) < -1, how to compute VEV (VaR-equivalent volatility)?
Let's suppose that some trader knows something, that most of other market participants don't know. That knowledge may be directly related to the stock market e.g. number of open long positions below/above current price or view on whole limit order book. Alternatively that trader may know that there will be an event...
How does better informed traders apply their advantage over the others?
Recently, I have been studying the relationship between COVID-19 and stock returns using a GJR form of threshold ARCH model. However, I got some unusual estimation results I can't figure out whether they are fine or not. The model I have estimated is written below: [1]: https://i.stack.imgur.com/8QsFz.png [![...
How to deal with negative intercept terms on GJR-GARCH(1,1) model?