instruction
stringlengths
15
26.1k
How do you calculate the discount margin of a floating rate bond using flat yield? What is the formula?
let $M_t$ be the following stochastic integral $$ M_t = \int_0^t \sigma_s dW_s $$ where $\sigma_t$ is a sufficiently regular deterministic function and $W_t$ is a standard Wiener process (that is $W_t \sim N(0,t)$ with independent increments). It can be shown that $M_t$ is martingale with distribution $M_t...
I am considering two risky assets following the usual correlated GBM given by $$\frac{\mathrm{d}S^{(i)}_t}{S^{(i)}_t}=\mu_i\mathrm{d}t+\sigma_i\mathrm{d}W^{(i)}_t,\quad i\in\{1,2\}$$ with $$\mathrm{d}W^{(1)}_t\mathrm{d}W^{(2)}_t=\rho\mathrm{d}t.$$ Here's my current understanding: I know that in general, *in ...
I am considering two risky assets following the usual correlated GBM given by $$\frac{\mathrm{d}S^{(i)}_t}{S^{(i)}_t}=\mu_i\mathrm{d}t+\sigma_i\mathrm{d}W^{(i)}_t,\quad i\in\{1,2\}$$ with $$\mathrm{d}W^{(1)}_t\mathrm{d}W^{(2)}_t=\rho\mathrm{d}t.$$ Here's my current understanding: I know that in general, *in ...
I want to run a Simulation in Matlab that involves the running costs of an electronic device which consists of the power consumption of this said device. The simulation should run for the next 1-5 years. Since the (daily/monthly/yearly) \$/kWh electricity prices are not constant over time, my thought was to model them ...
I know that it is possible to simulate two correlated GBM in e.g. Matlab ([Generating Correlated Asset Paths in MATLAB][1]) based on cholesky decomposition. However, they take as input the correlation matrix, which from my understanding is just the Pearson correlation coefficient. However, if I look at correlation betw...
Why using mid price to compute mark-to-market P&L if it is less accurate than using bid/offer price? If spread is wide, mid is really not representative of what you would get by getting rid of your inventory. Using best bid/offer would be more accurate even if it does not include slippage. Why don't we use best bid/of...
Why using mid price to compute mark-to-market P&L if it is less accurate than using bid/offer price?
I need to price bonds with CMS-linked coupons. In order to determine the convexity adjustment to apply to the forward rates, I would use the formula that appears in Hull's Futures, Options and other derivatives: [![enter image description here][1]][1] The bonds are denominated in EUR whose curve presents negati...
At the basis of an algorithm I need an Excel/CSV file containing the world's top 500 companies (with respect to market cap, preferably free-float if possible) by: Name, Country, Market-Cap (in USD, or weight points, just something consistent). Do you know where I can get this data for free? I was able to find r...
I am looking to solve $Ax=b$ for $x$ where $A$ is pentadiagonal square matrix (elements on the upper and lower diagonals can however equal to zero) and $x$, $b$ two vectors of the same size. The dimension of the problem can be large. $A$ can be 1000x1000 or more. I couldn't find a C++ implementation of a Thomas lik...
I am looking to solve $Ax=b$ for $x$ where $A$ is pentadiagonal square matrix (elements on the upper and lower diagonals can however equal to zero) and $x$, $b$ two vectors of the same size. The dimension of the problem can be large. $A$ can be 1000x1000 or more. I couldn't find a C++ implementation of a Thomas lik...
This is an excellent philosophical question. Recall that the goal of mark to market is to predict the P&L if we unwound this position in an orderly market. Suppose that you're in a very convinient world, where for every asset you know at all times the bid and offer (ask) prices, at which you can sell or buy these...
This is an excellent philosophical question. Recall that the goal of mark to market is to predict the P&L if we unwound this position in an orderly market. Suppose that you're in a very convinient world, where for every asset you know at all times the bid and offer (ask) prices, at which you can sell or buy these...
This is an excellent philosophical question. Recall that the goal of mark to market is to predict the P&L if we unwound this position in an orderly market. Suppose that you're in a very convinient world, where for every asset you know at all times the bid and offer (ask) prices, at which you can sell or buy these...
Beginner here, so apologies for the rather naïve question, I try to find answers elsewhere but mostly I found opinions (often contradicting and rarely with an explanantion). Maybe I'm using the wrong terminology in my searches, or maybe it's such a basic concept that it's not discussed... Anyhow.. I started explorin...
I wanted to make a summary table of stochastic functions to improve my understanding. Maybe the following should be a wiki page on this site so others can add functions and examples? Does the following look right? --- Let, $c$ be a constant <br> $k$ be a natural number <br> $t$ be a variable representing tim...
Here is an overview of the asset swap spread I found online: https://www.deriscope.com/docs/AssetSwaps_LehmanBrothers_2000.pdf I can't seem to make sense of the numbers in this example: [![Example][1]][1] [1]: https://i.stack.imgur.com/muImb.png Specifically, how is the swap floating side calculated? I tr...
What is the difference between the geometric brownian motion and cumulative product of percentage returns?
All the floating coupons are daycounted. Note that it says Floating Basis: Actual/365. The first period from October 20, 1999 to November 20, 1999 is odd, short, only 31 actual days. Year fraction 31/365 is 0.084931507 of a year - approximately 1/12, but we are trying to be exact. LIBOR is 0.02742 plus spread 0.0...
All the floating coupons are daycounted. Note that it says Floating Basis: Actual/365. (This is the usual daycount convention for GBP and some other currencies, but for USD the usual daycount convention would rather be Actual/360.) The first period from October 20, 1999 to November 20, 1999 is odd, short, only 31 ac...
In the Kaggle [Jane Street market prediction][1] competition we are put in a Supervised Learning Framework to deal with 'trade opportunities'. That is, we are given instances of previous trade opportunities with associated (anonymised) features, a 'weight' for the trade and a realisation ('resp') that can take negative...
I am looking to solve $Ax=b$ for $x$ where $A$ is pentadiagonal square matrix (elements on the upper and lower diagonals can however equal to zero) and $x$, $b$ two vectors of the same size. The dimension of the problem can be large. $A$ can be 1000x1000 or more. I couldn't find a C++ implementation of a Thomas lik...
I have been trying to explore the possibility of replacing my IEF/TYD (10 years treasury ETF) positions with ZN (10 years treasury futures) for better leverage. Reading the posts here, I understand that their return should be similar, except for the drag of financing cost. Not an issue for me as I will hold some sh...
I'm getting the different bond clean price from Bloomberg and from QL but surprisingly Bloomberg price matches with excel price() function I have the following bond : GETC21117030. The parameters are given below: | Parameter Name | Value | |----------------------|--------------| | Settlment Date ...
What is the difference between financial economics and finance?
I have been trying to explore the possibility of replacing my IEF/TYD (10 years treasury ETF) positions with ZN (10 years treasury futures) for better leverage. Reading the posts here, I understand that their return should be similar, except for the drag of financing cost. Not an issue for me as I will hold some sh...
So I have a problem I need to solve and no idea how to approach it. Its a verbal problem without any specific numbers given except for those below. So it is up to me to determine how to structure the problem and solve it. In a nutshell the goal is that I need a way to find the optimal mix of sources of liquidity ...
I am a UK investor and I hedge my US positions with M6B, a GBP/USD future. Every time I roll my contracts, I ask myself "why is there so little liquidity beyond the next three months?" Surely there are people that need to hedge their positions for more than three months and can save cost by rolling say only once/twi...
I have been trying to explore the possibility of replacing my IEF/TYD (10 years treasury ETF) positions with ZN (10 years treasury futures) for better leverage. Reading the posts here, I understand that their return should be similar, except for the drag of financing cost. Not an issue for me as I will hold some sh...
I have been trying to explore the possibility of replacing my IEF (10 years treasury ETF) positions with ZN (10 years treasury futures) for better leverage. Reading the posts here, I understand that their return should be similar, except for the drag of financing cost. Not an issue for me as I will hold some short-...
As a rule of thumb, how would the duration and convexity of a 30y UST bond paying X% compare to the duration and convexity of a matched maturity vanilla interest rate swap, with a similar fixed rate. Will have a lower duration and higher convexity than the corresponding swap? Intuitively, why would this be?
I was going through a proof of the Breeden-Litzenberger formula and I was stuck on one of the intermediate steps. The pdf for the prices of the underlying at expiry is defined as $f(x)$ and $S_T$ is the price of the underlying at expiry and $K$ is the strike price so the probability that the underlying expires at a...
How to derive the Breeden-Litzenberger formula?
I hedge my US positions with M6B, a GBP/USD future. Every time I roll my contracts, I ask myself "why is there so little liquidity beyond the next three months?" Surely there are people that need to hedge their positions for more than three months and can save cost by rolling say only once/twice a year, instead of d...
Anything wrong with rolling to a non-nearest future contract?
In a paper titled *Investing in Volatility* published in 1998 by Emanuel Derman, Michael Kamal, Iraj Kani, John McClure, Cyrus Pirasteh, and Joseph Z. Zou, I found the following assertion (on page 9) that I am trying to clarify: *The quantity $(1/2)\Gamma(\Delta S)^2$ is the gain from an instantaneous index move. The ...
In a paper titled *Investing in Volatility* published in 1998 by Emanuel Derman, Michael Kamal, Iraj Kani, John McClure, Cyrus Pirasteh, and Joseph Z. Zou, I found the following assertion (on page 9) that I am trying to clarify: *The quantity $(1/2)\Gamma(\Delta S)^2$ is the gain from an instantaneous index move. The ...
I hedge my US positions with M6B, a GBP/USD future. Every time I roll my contracts, I ask myself "why is there so little liquidity beyond the next three months?" Surely there are people that need to hedge their positions for more than three months and can save cost by rolling say only once/twice a year, instead of d...
Rolling to a non-front month future contract?
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy $1$ unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic currency...
So, a future is basically like a forward. $F_0(T) = S_0e^{T(r_{f,T}-r_{d,T}+x_T)}$ The longer dated you go, the more you have exposure to the stuff in the exponential (rates in the two currencies, and the xccy basis $x_T$). That's a trading choice: do you want to trade pure spot FX (or close to it), or the forward (...
In a paper titled *Investing in Volatility* published in 1998 by Emanuel Derman, Michael Kamal, Iraj Kani, John McClure, Cyrus Pirasteh, and Joseph Z. Zou, I found the following assertion (on page 9) that I am trying to clarify: *The quantity $(1/2)\Gamma(\Delta S)^2$ is the gain from an instantaneous index move. The ...
let $M_t$ be the following stochastic integral $$ M_t = \int_0^t \sigma_s dW_s $$ where $\sigma_t$ is a sufficiently regular deterministic function and $W_t$ is a standard Wiener process (that is $W_t \sim \mathcal{N}(0,t)$ with independent increments). It can be shown that $M_t$ is martingale with distrib...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy $1$ unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic currency...
I understand that under Merton Jump Diffusion Model, if we are going to estimate the parameters $ \alpha, \sigma,\mu_J, \delta, \lambda $, we can use maximum likelihood estimation on the probability density of log return $ Y_t = ln(\frac{X_t}{X_0}) $ $ P(Y_t) = \sum_{i=0}^{\infty} \frac{e^{-\lambda t}(\lambda t)^i}...
Efficient way to perform MLE on Merton Jump Diffusion model parameters?
I understand that under Merton Jump Diffusion Model, if we are going to estimate the parameters $ \alpha, \sigma,\mu_J, \delta, \lambda $, we can use maximum likelihood estimation on the probability density of log return $ Y_t = ln(\frac{X_t}{X_0}) $ $ P(Y_t) = \sum_{i=0}^{\infty} \frac{e^{-\lambda t}(\lambda t)^i}...
Let's say I have a simple strategy that involves going long on a stock whenever it rises above its 50 day moving average. As most are probably aware, this type of indicator works well in capturing sustained upward price movements and does equally well avoiding long downward price movements, but can get killed when pri...
I am working on an assignment to calculate Beta in the CAPM Model through empirical data on the british market and am still unsure which risk-free rate to use. Since I have a 1 week investment horizon, my first Idea was to use short term UK government bond yields provided by the Bank of England site (https://www.ban...
Which risk-free rate to use for the UK?
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy $1$ unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic currency...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy $1$ unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic currency...
While deriving the solution for the stochastic differential equation that models the Ornstein-Uhlenbeck process, Paul Wilmott (Paul Wilmott on Quantitative Finance, chapter 4, page 87) performs the following integration by parts ($X$ is normal): $$\int_{0}^{t}e^{\gamma(s-t)}dX(s) = X - \gamma \int_{0}^{t}e^{\gamma(s...
How do you calculate mergers and acquisitions firepower?
While deriving the solution for the stochastic differential equation that models the Ornstein-Uhlenbeck process, Paul Wilmott (Paul Wilmott on Quantitative Finance, chapter 4, page 87) performs the following integration by parts ($X$ is normal): $$\int_{0}^{t}e^{\gamma(s-t)}dX(s) = X - \gamma \int_{0}^{t}e^{\gamma(s...
In a paper titled *Investing in Volatility* published in 1998 by Emanuel Derman, Michael Kamal, Iraj Kani, John McClure, Cyrus Pirasteh, and Joseph Z. Zou, I found the following assertion (on page 9) that I am trying to clarify: *The quantity $(1/2)\Gamma(\Delta S)^2$ is the gain from an instantaneous index move. The ...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy $1$ unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic currency...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy $1$ unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic currency...
I was wondering if there are any papers on CPI announcements' impact on the price of certain securities that are tied to inflation rates. I know there are derivatives for inflation rate, but I was wondering if there are any studies on the impact of monthly CPI reports on TIPs or other fairly liquid or exchange traded s...
Federal Reserve Bank of New York [web page](https://www.newyorkfed.org/markets/treasury-repo-reference-rates-information) provides some information on the computation of the SOFR rate. ### Part 1 ### According to this webpage, the SOFR is calculated as the volume-weighted median: "The SOFR, the BGCR, and the T...
Federal Reserve Bank of New York [web page](https://www.newyorkfed.org/markets/treasury-repo-reference-rates-information) provides some information on the computation of the SOFR rate. ### Part 1 ### According to this webpage, the SOFR is calculated as the volume-weighted median: "The SOFR, the BGCR, and the T...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy a single unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic cur...
While deriving the solution for the stochastic differential equation that models the Ornstein–Uhlenbeck process, Paul Wilmott (Paul Wilmott on Quantitative Finance, chapter 4, page 87) performs the following integration by parts ($X$ is normal): $$\int_0^t e^{\gamma(s-t)} \, dX(s) = X - \gamma \int_0^t e^{\gamma(s-t...
While deriving the solution for the stochastic differential equation that models the Ornstein–Uhlenbeck process, Paul Wilmott (Paul Wilmott on Quantitative Finance, chapter 4, page 87) performs the following integration by parts ($X$ is normal): $$\int_0^t e^{\gamma(s-t)} \, dX(s) = X - \gamma \int_0^t e^{\gamma(s-t...
I want to implement a long vol hedging strategy by rolling spot variance swaps every month. This would be done through replicating spot VIX using the definition of VIX as a portfolio of OTM one-month calls/puts weighted by the inverse square of their strikes. In addition to transaction costs, I've read that time decay...
Practical Effect of Time-Decay on Variance Swaps?
swaps and bonds have a lot of similarity although one is a security and the other is a derivative. For example, 1. libor for swaps is like repo rate bonds (thinking them both as the funding leg) 2. fixed payment is like bond's coupon I feel that there could be a systematic way to link or think about them under t...
Swaps and bonds have a lot of similarity although one is a security and the other is a derivative. For example, 1. libor for swaps is like repo rate bonds (thinking them both as the funding leg) 2. fixed payment is like bond's coupon I feel that there could be a systematic way to link or think about them under t...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy a single unit of foreign currency at a strike of $K$ units of foreign currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic cur...
In trying to discover more about pricing American options with dividend payouts, I found the the post linked [here][1]. I notice two disagreeing answers when it comes to determining the replicating portfolio with discrete dividend payouts. @Pandaaaaaaa claims risk-neutral probabilities are independent of dividend yield...
Risk neutral probabilities in binomial option pricing with discrete dividends — which is correct?
I recently read about the book (Risk and asset allocation) written by Attilio Meucci and I found those statistical modeling and inference methods quite robust in my point of view, although there are always rooms to improve as the version of that book dated back to 2005. I searched quite a long time but I could not ...
In trying to discover more about pricing American options with dividend payouts, I found the the post linked [here][1]. I notice two disagreeing answers when it comes to determining the replicating portfolio with discrete dividend payouts. @Pandaaaaaaa claims risk-neutral probabilities are independent of dividend yield...
I am trying to price a digital option with payoff $\mathbb{I}_{S_T>K}$, where $S_t$ follows the Ornstein-Uhlenbeck dynamics $\mathrm{d}S_t=rS_t\mathrm{d}t+\sigma\mathrm{d}W^{\mathbb{Q}}_t$ in the risk-neutral measure $\mathbb{Q}$. I have managed to calculate that $\mathrm{d}(\mathrm{e}^{-rt}S_t)=\sigma\mathrm{e}^{-rt}\...
Pine script that could be applied on tradingview: ```pine study(title="RSI Divergence_alper", shorttitle="RSI Divergence_alper") src_fast = close, len_fast = input(5, minval=1, title="Length Fast RSI") src_slow = close, len_slow = input(14,minval=1, title="Length Slow RSI") up_fast = rma(max(change(src_fast), 0)...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy a single unit of foreign currency at a strike of $K$ units of domestic currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic cu...
I was looking at this formulas: USD_INDEX= 50.14348112 × EURUSD^-0.576 × USDJPY^0.136 × GBPUSD^-0.119 × USDCAD^0.091 × USDSEK^0.042 × USDCHF^0.036 and EUR_INDEX = 34.38805726 x (EURUSD^(0.3155) x EURGBP^(0.3056) x EURJPY^(0.1891) x EURCHF^(0.1113) x EURSEK^(0.0785)) I was wondering why those curren...
Calculating currency indexes weights?
From the textbook, *information coefficient (IC)* is a measure of the depth of an active manager’s skill. On a more formal basis, IC measures the “correlation” between actual returns and those predicted by the portfolio manager (Grinold & Kahn, 2000; Fabozzi & Markowitz, 2011). Cross-checking [Investopedia][1] suggests...
Is "Information Coefficient" correlation or rank correlation?
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy a single unit of foreign currency at a strike of $K$ units of domestic currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic cu...
In which book will I find the exact proof of put-call parity in the case when asset pays continuous dividend?
American foreign exchange currency call option — how do interest rates affect exercise time?
Risk neutral probabilities in binomial option pricing with discrete dividends — whose argument is correct?
Hope to get some help with the following questions: 1. Can someone explain what is the industry standard to calculate stock options historical volatility? I am using this estimator https://portfolioslab.com/yang-zhang with 52 weekly prices times square 52, but glad to learn more accurate methods. 2. Which rates...
What is the market standard for measuring historical volatility?
In this post [here](https://quant.stackexchange.com/questions/51311/how-do-we-determine-the-correct-measure/54722#54722) it is shown that the forward Libor rate $L(t,t_1,t_2)$, with $0 \leq t \leq t_1$, must be a martingale under the T-forward measure associated with the zero coupon bond $P(t,t_2)$ that matures at time...
Good morning to all, I wanted to post this question here hoping to have more details. The concern, in my opinion, comes from the fact that the concept of "closed-form" is not clear. Because, on the one hand, we have the algebraists who say that the gaussian function (error function) cannot have an analytical expre...
Are there really closed-form pricing formulas?
let $M_t$ be the following stochastic integral $$ M_t = \int_0^t \sigma_s dW_s $$ where $\sigma_t$ is a sufficiently regular deterministic function and $W_t$ is a standard Wiener process (that is $W_t \sim \mathcal{N}(0,t)$ with independent increments). It can be shown that $M_t$ is martingale with distrib...
I am studying idiosyncratic volatility. After applying the Fama Frech 3 Factor model with its Marktet, SMB and HML factors I want to build a factor based on idiosyncratic volatility. Can I just build a portfolio including the highest idiosyncratic volatility assets and one with the lowest idiosyncratic volatility a...
I am considering an American call option to purchase foreign currency which gives the right to the holder to buy a single unit of foreign currency at a strike of $K$ units of domestic currency at any exercise time $\tau\leq T$. I am supposing that exchange rate $X_t$ at which foreign currency is traded with domestic cu...
Are you doing this in an academic context? If so, the standard factor portfolio procedure is the [Fama-French][1] construct, which involves building 6 portfolios (split by size into 3/4/3 buckets and high/low based on your score) then average of the small and big. If you're doing this in an industry/work context, calcu...
I will try to provide *an answer* to your questions: 1. In retrospect, I do not believe that there is any industry standard for calculating historical volatility (I could be wrong on that part). As long as you have a consistent (and unbiased) estimator of variance (quadratic variation) you're set. As described in t...
Does anyone know how yahoo calculates Growth Estimates for the Next 5 Years (per annum)? For example, I can see 12.64% for AAPL as reporetd in Yahoo finance in [https://finance.yahoo.com/quote/AAPL/analysis?p=AAPL][1]. [![enter image description here][2]][2] [1]: https://finance.yahoo.com/quote/AAPL/analysis?p=...
American foreign exchange currency call option — how do interest rates affect optimal exercise?
I'm trying to download all tickers listed in the Tokyo stock exchange (according to [their website][1], there should be 3,756 tickers in total). What I have tried so far: - I have tried the [Yahoo-ticker-downloader][2]. But it can only download around 1/3 of all the tickers available. - I also tried [pytickersymbo...
How to download all tickers listed in the Tokyo stock exchange?
I have an actuarial background so I am not too sure if using yield extrapolation is a good way. https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.soa.org/globalassets/assets/files/resources/research-report/2019/yield-curve-report.pdf&ved=2ahUKEwjt3uyRh4DuAhXSa94KHUnDBYsQFjAMegQIFhAB&usg=AOvVaw2R66gNNIba...