instruction
stringlengths
15
26.1k
I have a function noted $u$ which I know the value on N points $s_{1} ,s_{2},.....,s_{N}$ we denote $u_{1},u_{2},...,u_{n}$ the values of u in these points and a grid of strikes $ (K_{i})_{1 \le i \le N_{k}} $ Im looking for the best approximation of $u$ as a sum of functions of the form $g(x)=\sum_{i=1}^{N_{k}}\alp...
Is non-stationarity an issue during copula estimation?
The returns of asset $A$ in **chronological order** are 0.03 0.01 -0.04 0.02 0.05 -0.10 0.02 The expected return, or sample mean, is $-0.00143$ while its sample volatility is $\sigma = 0.051455$ Next, I try to compute the same moments for a **shuffled version** of the time series which we'll...
How important is the ordering of historical returns?
How important is the chronological ordering of historical returns?
im looking for the complete intraday ticker data time-series for a number of securities that formerly were part of the s&p 500 index. eg. PGN, Progress Energy Inc, removed from index 2012 because: Acquired by Duke Energy wikipedia offers a list of some 250 former s&p 500 members. https://en.wikipedia.org/wiki/Lis...
s&p 500 stocks no longer in ^GSPC how to find historical ticker data?
where to find historical ticker data for securities no longer in s&p 500 index?
is the cos method used to calculate prices of options other than the European call? Or is this method only used for calibration? Is it possible to evaluate the barrier and lookback options? I am asking from the point of view of practice
I want to find the coskewness and cokurtosis of the multivariate LogN(mu, sigma) distribution from the moments of a normally distributed multivariate distribution (ie: log returns). These higher order moments are required to estimate the CVaR that I use as one of the objectives in my optimisation function. I have the f...
From the [CME website](https://www.cmegroup.com/trading/interest-rates/us-treasury/10-year-us-treasury-note_contract_specifications.html), we know that the contract unit for bond futures is "face value at maturity of $100,000". Which of the following is more appropriate the convention to compute "returns" on a 10-ye...
I need to calculate vanilla options prices for extreme moneyness range of e.g. (0%,1000%) under the Heston model for various parameter values that satisfy Feller. Which Fourier method (or other method) would be the most accurate for this? For instance the COS method is nice but I think it has some issues for extrem...
In portfolio theory in finance, given a set of $n$ assets to choose from, one often selects portfolio weights so as to maximize expected return and minimize some measure of risk, e.g. variance or [expected shortfall][1]*. If we consider asset returns to be random variables, we are looking for a linear combination, with...
I have a strategy on a stock (such as Buy and Hold) on which I have to calculate the maximum drawdown. The problem is that I'm working on returns expressed in percentages, so I do not have the time series of prices but the one of returns obtained at each step. So I wrote this code: def MDD(returns): rend_c...
I'll give it a start and stick with Fourier methods. The approaches from [Carr and Madan (1999)][1] and Fang and Oosterlee (2009) are indeed known to be inaccurate for highly OTM options. I'd suggest to try out one the following three alternatives. The first one seems to be the most relevant one. ## Saddlepoint Meth...
If I want to estimate Realized Kernel for 1 min bins, is there a way to compute the optimal bandwidth? In the reference paper: [Realised Kernels in Practice: Trades and Quotes][1] (Ole Barndoff-Nielsen et al.), it provides the following formula for the optimal bandwidth $H^*$: $$ \hat{H}^* = c^* \hat{\xi}^{4/5} n^{...
What are common methods to compute implied volatility index? One could use VIX method on other underlying. It is also easy to limit the method to 4 atm strikes. What are other approaches? PS IVolatility uses proprietary method that incorporates delta and Vega. Any insights into why and how? (I guess VIX method inc...
There's papers, etc. as others note. But I think it may be informative to debate the theoretical justifications of EMH. Because a conversation on technical analysis never seems to convince anyone. EMH can be generalized as (1) "the price is right" (2) "you can't beat the market". "The price is right": The ide...
The theoretical justification for technical analysis (TA) is less about market (in)efficiency; and more about prices as a signal of sentiment and positioning biases, that are neither always neutral nor unbiased. Anecdotes are cheap; but sometimes still helpful. In a past job, I was a traditional sell-side fundament...
To be clear, these are three different dollar interest rates? All US, not EUR, JPY, GBP, CAD etc. cross-currency comparisons? If just USD, how far forward do you need to construct your curve? If more than 5 years, then if you can't source decent swaps pricings, then you are constrained to Treasury pricing. Else if <...
What are common methods to compute implied volatility index? One could use VIX method on other underlying. It is also easy to limit the method to 4 atm strikes. Is this a good idea though? What are other approaches? PS IVolatility uses proprietary method that incorporates delta and Vega. Any insights into why and...
> I was thinking of simply limiting set of options that go into computation to K0 strike+ 1 option on each side (cboe.com/micro/vix/vixwhite.pdf). Not sure if this is a good idea though. Hence the question If you have a full/complete options chain then naturally to calculate the VIX you should use the VIX formula, w...
Can I write Ito's Lemma as a taylor expension?
Assume one has price data $P_{1}, P_{2}, \dots, P_{n}$ with one hour resolution and aims to forecast the variance for one hour ahead return. The first approach to try is ARCH or GARCH models. There are a lot of papers about that. Next, assume that the goal is the same, i.e. forecasting one-hour return's variance, BU...
Question: The change in the value of a portfolio in three months is normally distributed with a mean of $500,000$ and a standard deviation of $3$ million. Calculate the VaR and ES for a confidence level of 99.5% and a time horizon of three months. My try: We know that $VaR_{99.5} = F^{-1}(0.995)$ where $F^{-1}$ i...
Usually called WMA. The weighting is linear (as opposed to exponential) defined here: [Moving Average, Weighted][1]. I attempt to implement this in a python function as show below. The result is a list of values. My question is: are the result right? Also it is very slow... I input a dataframe from pandas wit...
I am a bit confused with the sign-related abbreviations used when we refer to long or short position on assets in a portfolio. For example denote the stock price, $S_t$ and the bond price, $B_t$ and consider the portfolio, $\Pi_t$, $$\Pi_t= -10S_t+2B_t$$ According to "the abbreviations", the term $-10S_t$ means t...
I agree with noob2 that it is a matter of convention. I do believe there is a good reason for it though and the common convention is the only right convention. $\Pi_t$ denotes the portfolio value at time $t$. If you bought a portfolio of just 10 stocks, surely you would expect it's value to be non-negative for ever...
Consider a low-volume exchange-traded security that sometimes sees no trading volume for days on end. Examples of such securities are some bonds, preferred shares, SPACs, and ETFs listed on the NYSE or Nasdaq. Suppose Alice happens to submit a buy limit order at \$10 on stock exchange X while Bob submits a sell limit o...
How do locked markets get resolved in a low-volume market?
I am going through the book ['Introduction to Risk Parity and Budgeting'][1] by Thierry Roncalli (2013). The author provides software for the various concepts illustrated in the book, but it is all done in GAUSS (see [here][2]). It's a language I have never used and do not have access to. I was wondering if someon...
Assume one has price data $P_{1}, P_{2}, \dots, P_{n}$ with one hour resolution and aims to forecast the variance for one hour ahead return. The first approach to try is ARCH or GARCH models. There are a lot of papers about that. Next, assume that the goal is the same, i.e. forecasting the return's variance one-hour...
I am going through the book ['Introduction to Risk Parity and Budgeting'][1] by Thierry Roncalli (2013). The author provides software for the various concepts illustrated in the book, but it is all done in GAUSS (see [here][2]). It's a language I have never used and do not have access to. I was wondering if someon...
In most of the litterature , for solving the optimal transport problem $sup_{Q\in \mathcal{M}}E^{Q}[c(S_{1},S_{2})]$ where $\mathcal{M}$ is the set of probability coupling such that the marginals of Q verify $Q^{1} \sim S_{1}$ and $Q^{2} \sim S_{2}$ and the martingale condition $E^{P}[S_{2}|S_{1}] = S_{1}$ which means ...
I agree with noob2 that it is a matter of convention. I do believe there is a good reason for it though and the common convention is the only right convention. First, $\Pi_t$ denotes the portfolio value at time $t$. If you bought a portfolio of just 10 stocks, surely you would expect it's value to be non-negative f...
I know that the exponentially weighted moving average (EWMA) volatility estimator drapes a decaying weight function over historical returns in order to weight the past according to the decay of their serial correlation functions (ACF) during the estimation of volatility, but if I instead only apply the same weighti...
Do EWMA weights remove autocorrelation in asset returns?
EWMA (and other sort of moving averages) introduces positive autocorrelation into otherwise **uncorrelated returns**. The fitted values of EWMA are linear combinations of past returns, and the constituent elements of these combinations overlap. Therefore, positive autocorrelation arises. If you have **autocorrelate...
I'm imagining some sort of site where you can look up all sorts of products that are traded (swaps, bonds, options, and all the variations that they exist in), and then the site gives an extremely short summary (e.g. 2-3 sentences) of what the product's does, and then a concise formula for its valuation. This soun...
Is there some sort of index of products, their description, and pricing?
> What are common methods to compute implied volatility index? > > One could use VIX method on other underlying. Yes, the CBOE offers this for Apple, Google, Amazon, Goldman Sachs and IBM ([see here][1]). In my working paper [here][2] I use the CBOE VIX methodology on a sample of 268 individual equities in the sam...
> What are common methods to compute implied volatility index? > > One could use VIX method on other underlying. Yes, the CBOE offers this for Apple, Google, Amazon, Goldman Sachs and IBM ([see here][1]). In my working paper [here][2] I use the CBOE VIX methodology on a sample of 268 individual equities in the sam...
I see a previous question https://quant.stackexchange.com/questions/8099/central-index-key-cik-of-all-traded-stocks mentioned https://www.sec.gov/include/ticker.txt contains the EDGAR Central Index Key (CIK) to ticker mapping. However, this file doesn't seem to have the historical mapping. Neither do the other answ...
If we have a `coupon bearing Bond` and want to calculate it's `Yield` then what is the standard practice to determine the Compounding frequency of Yield? Is it always considered as `Continuously compounded`? or the compounding frequency matches with the Interest payment's frequency? Appreciate for any pointer.
A few things... firstly, I've attached a correction to your code at the bottom. It runs, but gives a solution of 0.0. Not sure why that is, but the code runs at least, can you work out the pricing problem yourself? You've used the `import *` pattern here. It seems easy now, but it will cause you trouble in future, b...
I'm training a fully-connected feed-forward neural network on HFT (limit order book) data to predict the midprice at timepoint $t+\Delta t$ (assuming that $t$ is the current moment, and $\Delta t$ is around 10 seconds) and I'm having certain difficulties with feature engineering. Most of the features that are used in t...
Hey I have some problem with COS method. Here is the paper of Fang and Oosterlee https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.466.267&rep=rep1&type=pdf 1. Why in table 1.1 they write characteristic functions for $\ln(S_t/K)$ instead of $\ln(S_t/S_0)$ and where is this $K$? Is it hidden in $\mu$ term? An...
**Rules of Thumb** Are there any good rules of thumb for modeling spreads over the short-term? Sure. Consider the time of day, size on the bid vs the ask, minimum price increment, and volatility. Will you get much more than that here or anywhere? Doubtful. Moving beyond those basics is firmly in the land of *secret ...
I'm trying to better understand leveraged etfs, and specifically how they have convexity and volatility decay similar to options. An older [post][1] on this site asked a similar question and one of the respondents and the article they linked talked about how if you pair trade 2 leveraged etfs, where you either shor...
Leveraged ETF pair trade, where's the gamma/convexity?
I'm trying to conduct portfolio performance attribution using Carino smoothing, but it seems that the active returns do not match and I don't know why. Here is the example I use: \begin{array} {|r|r|r|r|r|r|r|r|r|r|} \hline portfolio &R_{t1} &R_{t2}&R_{t3}&R_{t4}&w_{t1}&w_{t2}&w_{t3}&w_{t4}\\ \hline sector...
Suppose there is a $400 million mortgage pass-through security with a 7.5% pass-through rate, a weighted average coupon of 8.125% and a weighted average maturity of 357 months, how to compute the cash flows for the next two months assuming a 100 Principal Securities Association(PSA)?
How to calculate the monthly cash flows of Mortgage Pass through Security?
I have two assets which seem not correlated (correlation coefficient = 6.3% using monthly frequency and 48 data points). I want to test the significance of the correlation. Null hypothesis is that correlation is nil, and if the p-value is lower than 0.05 then we can reject the null hypothesis (ie correlation is sign...
I have two assets which seem not correlated (correlation coefficient = 6.3% using monthly frequency and 48 data points). I want to test the significance of the correlation. Null hypothesis is that correlation is nil, and if the p-value is lower than 0.05 then we can reject the null hypothesis (ie correlation is sign...
I just can't wrap my head around why the put-call ratio makes sense. Whenever there is a put buyer, there is a put seller, same goes for a call buyer/call seller. In other words, if there are a lot of call options for a given stock or index, there is an equivalent number of people who have sold those calls that are bei...
I am trying to build a Monte Carlo simulation in Excel (yes, far from optimal) for valuation of a callable bond. I have some experience with MC simulation on path dependent derivatives with stocks as underlying assets, but very limited experience with interest rate modelling. For this exercise, I need to simulate inter...
I'd like to convert the US Treasury Constant Maturity series (par, semi-annual coupon, Actual/365 daycount convention) into Discount Factors (for appropriate comparison for certain money-market series, calculation of forward rates, conversion to alternative daycounts, etc.). The "hypothetical security" reflecting th...
I think you are missing an important point regarding who initiates options positions. We know that put options are more expensive than theory would indicate as discussed in [Bondarenko (2014)][1]. Simply: put option buyers are especially motivated to initiate positions, more so than put sellers. Thus put open intere...
It seems like put options on Index/ETFs generally have 50% more volume than call options, in terms of notionals. We don't see the same put/call volume ratios in single stocks. Why is that the case?
Why are Index/ETF put option volumes generally higher than the call option volumes?
It seems like put options on Index/ETFs generally have 50% more volume than call options, in terms of notionals. We don't see the same put/call volume ratios in single stocks. Why is that the case? I have thsi question after reading this article: https://www.ft.com/content/75587aa6-1f1f-4e9d-b334-3ff866753fa2...
I'm digging into the properties of the Local Vol model and I become confused with statements made by authors in papers/textbooks (without explanations) like, "The forward skew in local vol model flattens out" or "the local vol is not reliable to predict the forward skew". Denote the local vol deterministic function...
It seems like put options on Index/ETFs generally have 50% more volume than call options, in terms of notionals. We don't see the same put/call volume ratios in single stocks. Why is that the case? I have thsi question after reading this article: https://www.ft.com/content/75587aa6-1f1f-4e9d-b334-3ff866753fa2...
I have two assets which seem not correlated (correlation coefficient = 6.3% using monthly frequency and 48 data points). I want to test the significance of the correlation. Null hypothesis is that correlation is nil, and if the p-value is lower than 0.05 then we can reject the null hypothesis (ie correlation is sign...
Credit options follow a quoting convention for the vols based on strike, which fits in neatly with the Black-Scholes framework. So why are FX options vols quoted in terms of 25-delta Risk Reversals and Butterfly Spreads instead of directly by strike? If it's a short-hand to succinctly express the smile, then wouldn'...
Why are FX options vols quoted in 25RR and 25BF terms instead of by strike like credit options?
Suppose there is a **$400 million** mortgage pass-through security with a **7.5%** pass-through rate, a weighted average coupon of **8.125%** and a weighted average maturity of **357 months**, how to compute the cash flows for the next two months assuming a **100** Principal Securities Association(PSA)? I am quite c...
How to determine the cash flows of a Mortgage backed security?
I'm reading a material on DV01 calculation which use a example as follows: current 10-year Treasury note that is cheapest-to-deliver into the March 2009 10-Year Treasury Note futures contract: the 5-1/8s of May 15, 2016. The last trade for this note was 108-19 (i.e., 108 and 19-32nds or 108.59375), which represent...
We know that the forward Libor rate $L(t, T, T + \tau)$, in the absence of arbitrage, is a martingale under the measure $T + \tau$, i.e. $Q^{T+\tau}$. In this context: $$ \tag{1}\label{1} L(t, T, T + \tau) = \mathbb{E}_t^{T + \tau} \left[ L(T, T, T + \tau \right], $$ with $t \leq T$. This means that the expect...
We know that the forward Libor rate $L(t, T, T + \tau)$, in the absence of arbitrage, is a martingale under the measure $T + \tau$, i.e. $Q^{T+\tau}$. In this context: $$ \tag{1}\label{1} L(t, T, T + \tau) = \mathbb{E}_t^{T + \tau} \left[ L(T, T, T + \tau \right], $$ with $t \leq T$. This means that the expect...
We know that the forward Libor rate $L(t, T, T + \tau)$, in the absence of arbitrage, is a martingale under the measure $T + \tau$, i.e. $Q^{T+\tau}$. In this context: $$ \tag{1}\label{1} L(t, T, T + \tau) = \mathbb{E}_t^{T + \tau} \left[ L(T, T, T + \tau \right], $$ with $t \leq T$. This means that the expect...
I'm reading a material on DV01 calculation which use a example as follows: current 10-year Treasury note that is cheapest-to-deliver into the March 2009 10-Year Treasury Note futures contract: the 5-1/8s of May 15, 2016. The last trade for this note was 108-19 (i.e., 108 and 19-32nds or 108.59375), which represent...
We know that the forward Libor rate $L(t, T, T + \tau)$, in the absence of arbitrage, is a martingale under the measure $T + \tau$, i.e. $Q^{T+\tau}$. In this context: $$ \tag{1}\label{1} L(t, T, T + \tau) = \mathbb{E}_t^{T + \tau} \left[ L(T, T, T + \tau \right], $$ with $t \leq T$. This means that the expect...
I am trying to build a Monte Carlo simulation in Excel (yes, far from optimal) for valuation of a callable bond. I have some experience with MC simulation on path dependent derivatives with stocks as underlying assets, but very limited experience with interest rate modelling. For this exercise, I need to simulate inter...
Do we in practice have that floating rate bonds trade only at par? How is credit spread included in floating rate bonds in practice? The way I see it is two possible ways. 1. The first is that we have a case of floating rate bonds that pays coupons that are calculated by a benchmark rate $r_i$, so that each coupo...
Do floating rate bonds always trade near par?
I am trying to gain some new ways of thinking about the markets via the memos published by funds or individual investors/economists. In particular, I have found insights by [Blackrock](https://www.blackrock.com/us/individual/insights) very informative. Besides this, what sites have the best insights about global macro ...
A bond with a **30** year maturity, par value of **$1000** and is **8%** p.a. coupon is selling at an yield to maturity of **8%** p.a. The modified duration of the the bond at its yield is **11.26%**, and its convexity is **212.4**. If the bond's yield increases from **8% to 10%**, how to calculate the new price of the...
How to calculate the new price of a bond using duration rule and duration with convexity rule?
I am trying to compute the PDF for the Heston model using the Breeden Litzenberger formula. I have calculated the the Heston implied volatilities for a strike range (which i have interpolated using cubic spline interpolation) using python: [![enter image description here][1]][1] In order to get the PDF, I a...
I am trying to compute the PDF for the Heston model using the Breeden Litzenberger formula. I have calculated the the Heston implied volatilities for a strike range (which i have interpolated using cubic spline interpolation) using python: [![enter image description here][1]][1] In order to get the PDF, I a...
I can't quite even re-create your vol smile... when I plug in the parameters you've provided (at $\tau = 0.12$) I get a downward sloping vol smile that doesn't have a minimum at the strikes I looked at [![Vols, Option Prices and PDF][1]][1] I then backed out the options prices at each of a close-up grid of strike...
Let say I have a `Variance Swap` contract which will last between the time interval $T_1$ and $T_2$ against a strike with $K^2$. The underlying price is assumed to follow a `GBM`. Standing at time $T_0$, I need to value this contract. Is there any analytical Valuation formula to achieve this?
Let say I have a `Variance Swap` contract which is based on daily closing prices (not the continuous variance calculation) and will last between the day interval $T_1$ and $T_2$ against a strike with $K^2$. The underlying price is assumed to follow a `GBM`. Standing at time $T_0$, I need to value this contract. I...
We know that the forward Libor rate $L(t, T, T + \tau)$, in the absence of arbitrage, is a martingale under the measure $T + \tau$, i.e. $Q^{T+\tau}$. In this context: $$ \tag{1}\label{1} L(t, T, T + \tau) = \mathbb{E}_t^{T + \tau} \left[ L(T, T, T + \tau \right], $$ with $t \leq T$. This means that the expect...
* Getting overnight-to-12 month LIBOR on Bloomberg is easy. * Had difficulty finding GBP futures (range of maturities) on Bloomberg. Any tips (both USD and GBP)? * Swaps (maturities all the way to 30 years) data seems available, but if you have any specific products that you use (findable on Bloomberg), would appreci...
I am looking to bootstrap a USD and GBP yield curve: what are some of the futures and swaps I can use that are findable on Bloomberg?
Recommended Market Insights by Funds?
Let say I have a `Variance Swap` contract which is based on daily closing prices (not the continuous variance calculation) and will last between the day interval $T_1$ and $T_2$ against a strike with $K^2$. Standing at time $T_0$, I need to value this contract. Is there any analytical Valuation formula to achieve...
I am trying to gain some new ways of thinking about the markets via the memos published by funds or individual investors/economists. In particular, I have found insights by [BlackRock](https://www.blackrock.com/us/individual/insights) very informative. Besides this, what sites have the best insights about global ma...
Recommended market insights by funds?
I need to calculate the duration of a floating rate bond with spread. With zero spread the price of the bond is given by: $$p_\tau=(1+c_1)e^{-r(\tau_1) \cdot \tau_1}$$ so the duration is: $$-\frac{\frac{dp_\tau}{r}}{p_\tau} = \tau_1$$ So the duration is the time $\tau_1$ until the next coupon payment. When the sp...
I'm algotrading since 2018 and been profitable (not much, but consistent) since then. This year I thinking in make a business around this bot. My only doubt is how do I manage the fund of all users? If I enter in all the signals my bot sends to everyone probably the market will be affected and probably the "last" us...
How to go about simulations of variables like price-to-book or dividend yield? Basically I would like to do a simulation based testing of an investing strategy (other than historical simulation). It’s doesn’t make sense just simulating price and taking the other variables from history because they’re obviously very dep...
How to go about simulations of variables like price-to-book or dividend yield? Basically I would like to do a simulation based testing of an investing strategy (other than historical simulation). It’s doesn’t make sense just simulating price and taking the other variables from history because they’re obviously very dep...
Assume I write a call option on one share of the stock that I have. After selling the option I have an obligation to sell one share of the stock at some future time. I already have the stock, why would I want to hedge anything here? The idea of hedging is meaningless in this example. **Is there any other set up where t...
Assume I write a call option on one share of the stock that I have. After selling the option I have an obligation to sell one share of the stock at some future time. I already have the stock, why would I want to hedge anything here? The idea of hedging is meaningless in this example. **Is there any other set up where t...
Some bond coupons are securitized and sold as strip bonds. Why can't stocks be similarly "stripped" to produce securitized dividend strips? Is it merely because there is no retail demand for such a product?