instruction
stringlengths
15
26.1k
For a given: - Stock price ${\displaystyle S\,}$ Strike price ${\displaystyle K\,}$ Risk-free rate ${\displaystyle r\,}$ Annual dividend yield ${\displaystyle q\,}$ Time to maturity ${\displaystyle \tau =T-t\,}$ (represented as a unit-less fraction of one year), Vol...
The Wikipedia formulas for Vanna differ by a factor of 100x, why is that?
For a given: - Stock price ${\displaystyle S\,}$ Strike price ${\displaystyle K\,}$ Risk-free rate ${\displaystyle r\,}$ Annual dividend yield ${\displaystyle q\,}$ Time to maturity ${\displaystyle \tau =T-t\,}$ (represented as a unit-less fraction of one year), Vol...
I think the main problem is that, as @KurtG says, your example sine function exhibits strong momentum (albeit with reversals) and fitting an Ornstein-Uhlenbeck process to it results in strange parameters. However, it might be nice to check that your code is correct. To do so, let's simulate a process that we know ...
This is a great reference on discrete fixed/proportional dividends with local volatility. In your case you need to consider the pure stock process with the dividends removed and consider the conditions in section 3.2. https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1141877 There’s also a follow up paper to t...
I'm going over a chapter in Hull's Options, Futures, and Other Derivatives and am stuck on how the probability of default is derived. Here's the image of the derivation. [![enter image description here][1]][1] I can follow all of it except for one step: how do you derive $V(t) = e^{-\int_0^t \lambda(\tau) \,d\tau...
So I coded up the solution from here: https://quant.stackexchange.com/questions/57235/do-basket-options-have-a-closed-form-valuation-formula Which provides a good solution for equally-weighted underlyings under a Black model. The simplified Python code is here after modifying it quite a bit. I tried to add a weigh...
I don't have any solid background in finance, but I have a strong mathematics and physics background. I am reading "Algorithmic and high-frequency trading" from A.Cartea, S.Jaimungal and J.Penalva. In Sec.2.1 the authors discuss the Grossman-Miller Market Making Model without any trading fees or holding costs. I ...
What is the name for an option with mandatory exercise but where the holder can choose the exercise date? Is this even an option since there is mandatory exercise?
I don't have any solid background in finance, but I have a strong mathematics and physics background. I am reading *Algorithmic and high-frequency trading* from A.Cartea, S.Jaimungal and J.Penalva, CUP (2015). In Sec.2.1.1 (page 21) the authors discuss the Grossman-Miller Market Making Model without any trading f...
What is the name for an option with mandatory exercise but where the holder can choose the exercise date? Is this even an option since there is mandatory exercise? Mainly interested in a situation where the option holder will claim something at an unknown time in the future without an end date (perpetual).
Most quantitate libraries use float64 precision for monte-carlo or other method. Some academic papers do experiments on float16 and find it has some restrictions on float16. I just wondering if float32 precision is enough in industry?
Is float32 enough for option pricing?
For options on futures why is there no discounting?
The traditional way to build a volatility surface is to pull options data and then do some form of interpolation. What happens if there is no existing options market and only a spot market for asset X? You could compute realized volatilities from the spot price, add a premium and then get your IV that way. As for th...
How would one construct a volatility surface given only the spot price?
I'm trying to find the exact specification about the Swiss Valor number pattern. Is there even a pattern or is it just an increasing number?
Something has been bugging me for a while, and I can't really find an answer to it in papers. Maybe somebody can help me out. In addition to modelling the instantaneous vol, or modelling forward variance swap prices, in order to explain the implied volatility surface some have tried to model implied volatility direc...
I want to compute the Expected Shortfall from a distribution of returns. I have no closed solution for my distribution of returns, so I wonder if I can simply compute ES by taking the mean of all the values below a certain quantile. From my understanding, this seems to be what the [analytical formula](https://en.wik...
How to incorporate ESG in Portfolio Optimization?
Is there a way to create a Leg in quantlib in which the notional and reset amounts are calculated by how an index/equity performs?
Does quantlib support Equity/Index Swap valuations?
I know that empirically the uncovered interest rate parity fails. But let's set that aside for a moment. The uncovered interest rate parity says: $$(1+r_{USD}) E_{EUR,USD} = (1+r_{EUR}) $$ where $r_{USD}$ is the interest rate on the dollar deposit, $E_{EUR,USD}$ is the exchange rate (how many euros for 1 doll...
Actually, quite the contrary! Indeed everything else been equal, dollar tends to appreciate. If you think the reason is quite simple: if ECB rate is 0% and FED moves from 0% to 0.25%, where do you want to have your money on? Dollar of course. Everyone will have an incentive to buy Dollars (again, if interest rate...
I have tried using both yield curve levels as well as daily moves (absolute change) while doing PCA. Using both types of input/dataset gives me roughly the same shape in terms of principal components matching the empirical observation: parallel shift, slope, butterfly. For daily moves, I am not doing any centering ...
Yield curve PCA: levels or daily moves?
Something has been bugging me for a while, and I can't really find an answer to it in papers. Maybe somebody can help me out. In addition to modelling the instantaneous vol, or modelling forward variance swap prices, in order to explain the implied volatility surface some have tried to model implied volatility direc...
Suppose that $dS_t=S_t(\mu\mathop{dt}+\sigma\mathop{dW_t})$ which has solution $$S_t=S_0\exp\left(t\left(\mu+\frac{\sigma^2}{2}\right)+\sigma W_t\right),$$ such that $W_t$ is a Wiener process, $\mu$ is drift, and $\sigma$ is volatility. Does this imply that some constant$$K=\text{kurt}\left(\frac{S_{t+\delta}-S_t}{S...
Is Kurtosis of Returns in Geometric Brownian Motion Constant?
I am trying to find index entries (not delisting data) on CRSP (i.e., where a specific stock with a PERMNO/CUSIP enters the S&P500), but despite trawling through the documentation I am unable to find this data. Several academic (finance) papers suggest that CRSP does indeed have this data. Would anybody be so kind as t...
Suppose that $dS_t=S_t(\mu\mathop{dt}+\sigma\mathop{dW_t})$ which has solution $$S_t=S_0\exp\left(t\left(\mu+\frac{\sigma^2}{2}\right)+\sigma W_t\right),$$ such that $W_t$ is a Wiener process, $\mu$ is drift, and $\sigma$ is volatility. So can \begin{split} K(\delta)&=\text{kurt}\left(\frac{S_{t+\delta}-S_t}{S_t}\...
What is the Kurtosis of Returns in Geometric Brownian Motion?
I'm trying to see the influence of autocorrelation in my processes and to do so I have to compute it, however it seems to be hard to find a coherent formula over the web. I found pretty much two different ones which are those : [![First Formula][1]][1] [![Second Formula][2]][2] [1]: https://i.stack.imgu...
What's the right autocorrelation formula?
I am trying to find index entry events (not delisting events) on CRSP (i.e., when a specific stock with a PERMNO/CUSIP enters the S&P500), but despite trawling through the documentation I am unable to find this data. Several academic (finance) papers suggest that CRSP does indeed have this data. Would anybody be so kin...
What would you consider leverage? I know this may sound like a basic question but I have spoken with several industry professionals with a significant amount of experience and all of them have a different definition of leverage. There are some that consider collateralized financing and investing in a low risk inves...
What is Leverage?
Recently I've been reading about mathematical models in finances and economics; however, I encountered this book chapter: Nagurney, A. (1993). Financial Equilibrium. In: Network Economics: A Variational Inequality Approach. Advances in Computational Economics, vol 1. Springer, Dordrecht. https://doi.org/10.1007/978-...
What could be a real-life example of sectors and instruments in a Financial Market in the context of this Portfolio Optimization Problem?
Recently I've been reading about mathematical models in finances and economics; however, I encountered this book chapter: Nagurney, A. (1993). Financial Equilibrium. In: Network Economics: A Variational Inequality Approach. Advances in Computational Economics, vol 1. Springer, Dordrecht. https://doi.org/10.1007/978-...
I am trying to compute the BKM implied moments in python by following this paper: https://papers.ssrn.com/sol3/papers.cfm?abstract_id=1732640, which in page 7 and 8, describe the integrals for variance, skewness and kurtosis by equations (8), (9) and (10). In page 8 part B. Empirical implementation, the authors go o...
I had always reckoned that IVs on Leveraged ETFs (LETF) are ["increased by the same amount as the leverage i.e. if it is 2x then IV will be 2x. This will essentially double your cost (in my example), while likely paying more bid/offer."](https://www.reddit.com/r/options/comments/e895ib/trading_options_on_leveraged_ando...
For the same underlying index, strike price, and expiration — why are options on Leveraged ETFs cheaper?
I had always reckoned that IVs on Leveraged ETFs (LETF) are ["increased by the same amount as the leverage i.e. if it is 2x then IV will be 2x. This will essentially double your cost (in my example), while likely paying more bid/offer."](https://www.reddit.com/r/options/comments/e895ib/trading_options_on_leveraged_ando...
Why are options on Leveraged ETFs cheaper than ETFs — on the same underlying index and expiration?
I had always reckoned that IVs on Leveraged ETFs (LETF) are ["increased by the same amount as the leverage i.e. if it is 2x then IV will be 2x. This will essentially double your cost (in my example), while likely paying more bid/offer."](https://www.reddit.com/r/options/comments/e895ib/trading_options_on_leveraged_ando...
MPT and Mean Variance optimisation do not take into account fat tails and many other things like the problema in estimating the co variances etc. Nassim Taleb has been arguing this for a long time, following the ideas by Mandelbrot. They argues stock prices are fractals, but I couldn’t find what they suggest regarding ...
Portfolio construction: If modern portfolio theory is not good than what else?
I recently came across the following method for portfolio optimization: Let $Y$ be a random variable that describes the returns of $n$ assets. Fix a constraint matrix $A \in \mathbb{R}^{m \times n}$ and $b \in \mathbb{R}^m$. Then, we sample from $y$ and calculate the weights $x$ that maximize returns under the constrai...
I'm working on a scenario needs to price an option on volatility. After googling, there is no clear relevants in this field. VIX options pricing is one way, while seems it takes the VIX (a volatility) an underlying and pricing using Black-Scholes given the VIX options very liquid on the market, i.e. easy to derive the ...
I recently came across the following method for portfolio optimization: Let $Y$ be a random variable that describes the returns of $n$ assets. Fix a constraint matrix $A \in \mathbb{R}^{m \times n}$ and $b \in \mathbb{R}^m$. Then, we sample from $y$ and calculate the weights $x$ that maximize returns under the constrai...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
**Assumptions** As discussed, some assumptions will be made. You mentioned an illiquid stock in your question. I'll get to that, but let's first assume that the stock price $S_u$ satisfies the following SDE under the pricing (risk-neutral) measure: $$ dS_u = \left[r(u)-q(u)\right]S_u \,du + \sigma_u S_u \left[\rho...
I am trying to compute the BKM implied moments in python by following this paper: Neumann, Skiadopoulos: *Predictable Dynamics in Higher Order Risk-Neutral Moments: Evidence from the S&P 500 Options*, Journal of Financial and Quantitative Analysis (JFQA), 2013, p947-977 [link][1] which in page 7 and 8, describe...
There are two funds: A and B. <br> 100% of fund A belongs to fund B. <br> 100% of fund B belongs to fund A. <br> Fund A has USD 1 mln of cash and no debt. <br> Fund B has USD 10 mln of cash and no debt. <br> How would you calculate the price of funds A and B?
I'm curious whether it's possible to short mutual funds in any way? I have given it some thought and I guess that in principle, it is possible using a total return swap. However, I'm sure that the hedging costs of the counterpart as well as other reasons make the setting of this kind of TRS prohibitively expensive (nev...
Is it possible to short publicly traded mutual funds?
There are three funds: A, B and C. <br> Each of them belongs to the two other in equal parts, i.e. <br> 50% of fund A belongs to fund B and 50% to fund C, and so on. <br> Fund A has USD 1 mln of cash and no debt. <br> Funds B and C each have USD 10 mln of cash and no debt. <br> How would you calculate the price...
There are three companies: A, B and C. <br> A fully belongs to B, B fully belongs to C and C fully belongs to A. Company A has USD 1 mln of cash and no debt. <br> Company B and C each have USD 10 mln of cash and no debt. <br> These companies are registered in different jurisdictions, so that regulators couldn't...
There are three companies: A, B and C. <br> A fully belongs to B, B fully belongs to C and C fully belongs to A. <br><br> Company A has USD 1 mln of cash and no debt. <br> Company B and C each have USD 10 mln of cash and no debt. <br> These companies are registered in different jurisdictions, so that regulators ...
I am trying to compute the BKM implied moments (Bakshi, Kapadia and Madan 2003) in python by following this paper: Neumann, Skiadopoulos: *Predictable Dynamics in Higher Order Risk-Neutral Moments: Evidence from the S&P 500 Options*, Journal of Financial and Quantitative Analysis (JFQA), 2013, p947-977 [link][1] ...
I am looking at a data set of 60 monthly returns (last 5 years) and want to calculate an annualized Sharpe Ratio. The usual way of doing this is to calculate the monthly Sharpe Ratio first, and then multiply it by a scaling factor. This scaling factor is the square root of 12 if returns are not serially correlated....
How to annualize monthly returns that are serially correlated?
How to annualize Sharpe Ratio if monthly returns are serially correlated? Calculation of autocorrelations
I am looking at a data set of 60 monthly returns (last 5 years) and want to calculate an annualized Sharpe Ratio. The usual way of doing this is to calculate the monthly Sharpe Ratio first, and then multiply it by a scaling factor. This scaling factor is the square root of 12 if returns are not serially correlated....
I will need to use weekly ATR (ATR computed using weekly HLC data) to compute some technical indicators on a daily time scale. But instead of directly computing the weekly ATR, it is more convenient to compute daily ATR (ATR computed using daily HLC data), and the quote data are in daily time frame. Is there a straight...
Relation between Weekly ATR and daily ATR?
I am looking at a data set of 60 monthly returns (last 5 years) and want to calculate an annualized Sharpe Ratio. The usual way of doing this is to calculate the monthly Sharpe Ratio first, and then multiply it by a scaling factor. This scaling factor is the square root of 12 if returns are not serially correlated....
I always thought that 1 ISIN uniquely identifies 1 financial instrument. However, I have come across cases, where the **same ISIN** is used for a **stock** and a **bond**: 1. `NZFCND0004S9` is ISIN for perpetual **bond** `NUFAU Float PERP Corp` and **stock** `NFNG AU Equity`. 2. `AU0000SBKHB3` is ISIN for perpetual *...
Can 2 unique Instruments have the same ISIN?
I recently came across the following method for portfolio optimization: Let $Y$ be a random variable that describes the returns of $n$ assets. Fix a constraint matrix $A \in \mathbb{R}^{m \times n}$ and $b \in \mathbb{R}^m$. Then, we sample from $y$ and calculate the weights $x$ that maximize returns under the constrai...
I recently came across the following method for portfolio optimization: Let $Y$ be a random variable that describes the returns of $n$ assets. Fix a constraint matrix $A \in \mathbb{R}^{m \times n}$ and $b \in \mathbb{R}^m$. Then, we sample from $y$ and calculate the weights $x$ that maximize returns under the constrai...
I am learning a mathematical finance course and the lecturer didn't provide us with a rigorous definition of utility functions. He just shows us (by simple Calculus) that the utility functions of every CRRA type agent are $u(x)=\ln x$ or $\frac{x^{\gamma -1}}{\gamma -1}$, where $x$ is the wealth of the agent involv...
I am looking at a data set of 60 monthly returns (last 5 years) and want to calculate an annualized Sharpe Ratio. The usual way of doing this is to calculate the monthly Sharpe Ratio first, and then multiply it by a scaling factor. This scaling factor is the square root of 12 if returns are not serially correlated....
If USSWIT10 Curncy is the expected average inflation for ten years and the USSWIT5 Curncy is the expected average inflation for five years, I don't know why that formula would tell me what the expected 5 year inflation rate would be 5 years from now. Shouldn't there be some sort of compounding taken into account? I...
I recently came across the following method for portfolio optimization: Let $Y$ be a random variable that describes the returns of $n$ assets. Fix a constraint matrix $A \in \mathbb{R}^{m \times n}$ and $b \in \mathbb{R}^m$. Then, we sample from $Y$ and calculate the weights $x$ that maximize returns under the constrai...
the autocorrelation is the correlation of a process $X$ and its lagged version, hence you have to consider it from a probabilistic viewpoint. Use the $\sigma_\ell$ notation for the operator that shifts a process: $${\cal A}(X;\ell):=\frac{\mathbb{E}\big((X - \mathbb{E}X) \cdot (\sigma_\ell\circ X - \mathbb{E}\sigma_...
in general, the bid-ask spread is proportional to the volatility and inverse proportional to the number of trades per day: $$\psi\propto \frac{\sigma}{\sqrt{N}}.$$ This is true for small tick securities, for large tick securities you need to introduce a "bid-ask bound term" (the Rosenbaum's $\eta$). For details s...
In fixed income, or in any other products for that matter, borrowing an asset is essentially shorting the asset. As a result, you would see hard-to-borrow names where the borrow rates are much higher than normal repo rates. I have recently heard some people mentioning the phrase "repo out a bond" interchangeably wit...
Is repo-ing out a bond the same as shorting the bond?
I was wondering if it's pertinent to use this interpretation of the expected utility function given by the Taylor series expansion, $${E(U(W)}\approx{U[E(W)}]+\frac{U''[E(W)]\sigma^2_W}{2}\tag{1}$$ to delineate my optimal portfolio from the set of portafolios that lie on the efficient frontier? So, let's say...
As always, the answer depends a bit on the problem domain. Commonly, utility functions only 'make sense' in terms of preference orderings, i.e. $$B \succsim A \quad \Leftrightarrow \quad u(B)\geq u(A) \tag{1}\label{1}$$ If the agent weakly prefers $B$ over $A$, then their utility of $B$ must be weakly large...
As always, the answer depends a bit on the problem domain. Commonly, utility functions only 'make sense' in terms of preference orderings, i.e. $$B \succsim A \quad \Leftrightarrow \quad u(B)\geq u(A) \tag{1}\label{1}$$ If the agent weakly prefers $B$ over $A$, then their utility of $B$ must be weakly large...
Theoretically: no, for most practical purposes: yes, given the risks are [small risks, see these lecture notes on p76](https://www.princeton.edu/~markus/teaching/Fin501/04Lecture.pdf#page=76). see below. Belows's the background and one example showing you why you can run into problems: Given two portfolio compo...
Theoretically: no. For most practical purposes: yes; given that risks are [small risks, see these lecture notes on p76](https://www.princeton.edu/~markus/teaching/Fin501/04Lecture.pdf#page=76). --- Belows's the background and one example showing you why you can run into problems: Given two portfolio compos...
Theoretically: no. For most practical purposes: yes; given that risks are [small risks, see these lecture notes on p76](https://www.princeton.edu/~markus/teaching/Fin501/04Lecture.pdf#page=76). --- Belows's the background and one example showing you why you can run into problems: Given two portfolio compos...
Taking a class in financial derivatives (book we use is Tomas Björk's Arbitrage theory in continuous time) but can't understand the exact meaning of how the Wiener process is defined. In the book one can read: "*the Wiener process will be a continuous function of time which is non-differentiable at every point. This a ...
Quantlib: How to bootstrap FedFunds Index having other tenors 3M, 1Wk, etc?
I have owned a penny stock for a while now that typically trades between $0.0002 and $0.0003. The thing is, though, that it most frequently trades BETWEEN those two price points and doesn't actually hit them very often. The platform I use to trade (along with any others I've so far investigated) only allow trading out ...
Does anyone know of any brokerages that allow trades to be placed in prices out to the 5th decimal place?
https://www.tradingtechnologies.com/xtrader-help/x-study/technical-indicator-definitions/volume-delta-vol/ Bid and ask volume is defined as the volume traded at bid or ask prices. Given only OHLCV data, how to approximate the bid and ask volume?
How to approximate bid and ask volume?
This is more of an academic question. The results are SO close, I think they are ACTUALLY THE SAME FORMULAS. So someone published a paper with a "new" method to adjust Kirk's formula to make it more accurate, and the reality is, I think it's just a rearranged version of another paper's formula. Or that's what it app...
Interesting finding... "Adjusted Kirk's" and "Bjerksund-Stensland" are exactly the same ??? Spread option calculation