instruction
stringlengths
15
26.1k
assume a probability distribution with a mean of %10 and standard deviation of %1.5. In wanting to solve the probability of return being lower than %5, the normal distribution is written down and integrated as follows: integral_(-∞)^0.05 e^(-1/2 ((x - 0.1)/0.015)^2)/(sqrt(2 π) 0.015) dx = 0.00042906 which gives %...
assume a probability distribution with a mean of %10 and standard deviation of %1.5. In wanting to solve the probability being lower than %5, the normal distribution is written down and integrated as follows: integral_(-∞)^0.05 e^(-1/2 ((x - 0.1)/0.015)^2)/(sqrt(2 π) 0.015) dx = 0.00042906 which gives %0.04 if...
assume a probability distribution with a mean of %10 and standard deviation of %1.5. In wanting to solve the probability being lower than %5, the normal distribution is written down and integrated as follows: $\int_{-∞}^{0.05} e^{(-\frac{1}{2} ((x - 0.1)/0.015)^2)}/(\sqrt{2 π} 0.015) dx = 0.00042906$ which gives ...
First, are you building the surface for european style options or american style, different complexities altogether for american style.. that being said, what data do you have to begin with? just price data? if so, then yes you need to find a way to calculate the zero curve & the dividend yield to get an IV. On...
I understand FX Options are often quoted via ATM, RR, BF for 10/25 deltas. There are many resources that outline how to convert those quotes back into absolute strike space (using spot delta or forward delta, premium adj or unadj, etc). For details, see e.g. **A Guide to FX Options Quoting Conventions** by Dimitri Reis...
Can someone prove that for some security $S_t$ with drift $\mu$ and volatility $\sigma^2$ in a Black-Scholes market we have that $Y_t = (S(t))^{1/3} \sim \text{Lognormal}$, w.r.t. the *risk-neutral measure* $\mathbb{Q}$? Also, would the drift in this case just be $\mu$?
I am using the Coinbase WebSocket API to extract real-time data about the orderbook for BTC-USD. I am using the following code to store the snapshots of bids and asks and the changes to the orderbook everytime there is an update from the exchange. import websocket,json import pandas as pd import...
I am trying to look for methods to aggregate and find the average of qualitative data. There are 20 qualitative measures, each divided unevenly into 4 cycles labeled 1-4. I am trying to find which bucket would be the mean? I cannot simply take the average, as that would cause problems if most were labeled 1 and 4. T...
How to aggregate qualitative data?
I Have to solve the following PDE: \begin{equation} \begin{cases} \dfrac{\partial F}{\partial t}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial x^2}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial y^2}+\dfrac{\partial^2 F}{\partial x\partial y}=0\\\\ F(t,x,y)=xy^2 \end{cases} \end{equation} My problem is the presence of th...
How can I in `QuantLib` add redemptions to a `AmortizingFloatingRateBond` that follow in dates outside the Bond Schedule? ``` self.schedule = ql.Schedule(ql.Date(18, 5, 2022), ql.Date(10, 12, 2026), self.frequency, ql.UnitedStates(), ql.ModifiedFollowing, ql.ModifiedFollowing, ...
I Have to solve the following PDE: \begin{equation} \begin{cases} \dfrac{\partial F}{\partial t}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial x^2}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial y^2}+\dfrac{\partial^2 F}{\partial x\partial y}=0\\\\ F(t,x,y)=xy^2 \end{cases} \end{equation} My problem is the presence of th...
Why cant I run all the stocks in the stock market thru a PCA model, and use the resulting principal components to create a factor model to price stocks and then buy stocks under priced and short stocks overpriced according to said model? Does it have to with the fact that PCA is unsupervised?
Why cant I use PCA to find all stock factors?
I'm trying to make a simple script that calculates fees (commission, regulatory, exchange and others). Taking [enter link description here][1] as an example I have a few questions: 1) Is "Value of Aggregate Sales" the same as "Trade Value" (i.e. number of securities traded*the value of those securities) 2) With re...
I'm trying to make a simple script that calculates fees (commission, regulatory, exchange and others). Taking [Fee Table from IBKR][1] as an example I have a few questions: 1) Is "Value of Aggregate Sales" the same as "Trade Value" (i.e. number of securities traded*the value of those securities) 2) With regards to...
Lets suppose a G10 FX vol market-maker starts out with a flat book. During the day, the market-maker bought a **EURUSD 1 week ATM** straddle from one client while sold **USDJPY 1 week ATM** straddle from another client, with same USD notional. So the entire book looks like this: - long EURUSD 1 week ATM straddle ...
Suppose that I have forward 1-month forecasts of returns that are updated daily. Is it suboptimal to rebalance more frequently than 1-month (e.g., daily or weekly)? Theoretically, if I forecast the stock to return 1% over a month, I will only realise the 1% (on average) if I held the stock for 1 month. If my forecast i...
Is intra-forecast-horizon rebalancing suboptimal?
I'd say it depends on how you consider EURJPY vols, do you actively mark them? or do you derive them based on some model assumptions off USD pairs? based on this you should go through the USD pairs or not for consistency. There are some other threads that discuss this: [how-should-i-convert-fx-volatility-surface-...
I saw this paragraph in the [SHV prospectus][1] > The Underlying Index is market valueweighted based on amounts > outstanding of issuances consisting of publicly issued U.S. Treasury > securities that have a remaining term to final maturity of less than > or equal to one year as of the rebalance date and $1 bill...
*I have tried to address your question below. However, your question is a bit "broad" in the sense, that you do not disclose what forecasting model you are applying and what your end-goal is.* #### *"Is it suboptimal to rebalance more frequently than 1-month (e.g., daily or weekly)?"* This depends on the situatio...
I have the following strategy Instrument : crypto pairs (50 coins) short only ,Markets : spot and futures (isolated margin account margin sell (for spot) and futures on Binance) ,Frequency : ~5-10 trades a day ,Hold time : few hours to 2-3 days ,Capital allocation : I allocate ~8% of total capital per position and...
I have the following strategy Instrument : crypto pairs (50 coins) short only ,Markets : spot and futures (isolated margin account margin sell (for spot) and futures on Binance) ,Frequency : ~5-10 trades a day ,Hold time : few hours to 2-3 days ,Capital allocation : I allocate ~8% of total capital per position and...
The question is, would having a position in EUR/Yen straddles help reduce risk? Consider the possible movements of EURJPY. If it doesn’t move, then having the EURJPY straddle is not affecting the overall payoff. If EURJPY does move, the move can be broken down into two separate components I.e. the move in EURUSD and ...
I saw this paragraph in the [SHV prospectus][1] > The Underlying Index is market valueweighted based on amounts > outstanding of issuances consisting of publicly issued U.S. Treasury > securities that have a remaining term to final maturity of less than > or equal to one year as of the rebalance date and $1 bill...
I'd say it depends on how you consider EURJPY vols, do you actively mark them? or do you derive them based on some model assumptions off USD pairs? based on this you should go through the USD pairs or not for consistency. You inherently will be making a correlation assumption about the currency triangle and their co...
#### *"Is it suboptimal to rebalance more frequently than 1-month (e.g., daily or weekly)?"* This depends on the situation. On one side, if you rebalance your portfolio on a daily basis you will update the views of the portfolio more frequently and thus will (on average) be closer to your target metric over time. Ge...
Is there a dollar index against emerging market currencies? Since the conventional dollar index is just against a few developed market currencies. Alternatively, is there an index that measures the central bank target rate differences between US (in which case fed fund rates) and emerging markets?
Is there a dollar index against emerging market currencies? The conventional dollar index (ticker **DXY**) is just an index against a few developed market currencies (the DXY is a weighted geometric mean of the dollar's value against **EUR** (57.6% weight), **JPY** (13.6%), **CAD** (9.1%), **SEK** (4.2%) and **CHF*...
I'm wondering why a handful of companies, mostly banks or financials, don't have filings or XBRL companyfacts data on EDGAR? I'm new to EDGAR and was poking around. I noticed there are a handful of companies without data in XBRL companyfacts link `https://data.sec.gov/api/xbrl/companyfacts/CIK**********.json`. These...
Brainstorming this afternoon. GEX is the gamma exposure index (https://squeezemetrics.com/monitor/static/guide.pdf). It's the sum of gamma exposure for call and put. Using IV, strike and BDS you can sum gamma for call and put to get an gamma exposure chart as spotgamma do : https://spotgamma.com/free-tools/spx-gam...
How to forecast volatility using gamma exposure index?
Are they all FDIC banks? Please see Edgar FAQ https://www.sec.gov/os/webmaster-faq#fdic-banks
For computing the expected future price (on a small time scale) one can use micro price which is defined [here][1]. And then I heard of milliprice which is located [here][2] but after reading the presentation I am still not sure how to compute it. I understand it includes last trade price but that is about it. ...
I would like to analyze the beta anomaly following the method used in the following paper "The low-risk anomaly: A decomposition into micro and macro effects"(Baker et al, 2014). I constructed the quintiles and run the regressions, and substructed the Low-High alphas as they have done in table 1 (panel A). However, in ...
I would like to analyze the beta anomaly following the method used in the following paper "The low-risk anomaly: A decomposition into micro and macro effects"(Baker et al, 2018). (the link: https://www.tandfonline.com/doi/full/10.2469/faj.v70.n2.2?needAccess=true) I constructed the quintiles and run the regressions, a...
For computing the expected future price (on a small time scale) one can use micro price which is defined [here][1]. The definition of micro-price is `S = Pa * Vb / (Va + Vb) + Pb * Va / (Va + Vb)` where Pa is the ask price, Va is the ask volume, Pb is the bid price, and Vb is the bid volume. And then I hear...
There is a fascinating book from 1904 (yes, published more than 100 years ago) written by S. A. Nelson called "*The A B C of Options and Arbitrage*" (a reprint of it used to be available on Amazon [here](https://www.amazon.co.uk/gp/product/0217568386/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1), for example) Qu...
I'm working on a 50-years financial timeseries and I would like to simulate GBM paths from it. The first thing I'm supposed to do is to estimate the *drift* $\mu$ and the *volatility* $\sigma$ parameters. What I've done so far is to come up with the estimate on the entire history, but I think it's quite a big app...
I am looking for historical market capitalization for: - SPX 500 index - MSCI EAFE index Bloomberg data for market capitalization oddly enough only seems to start in 2000s. Which other paid or free databases can I try?
Where to get market capitalization data for these two indexes?
I would like to analyze the beta anomaly following the method used in the following paper "The low-risk anomaly: A decomposition into micro and macro effects" by (Baker et al, 2018). (the link: https://www.tandfonline.com/doi/full/10.2469/faj.v70.n2.2?needAccess=true) I constructed the quintiles and ran the regression...
[![enter image description here][1]][1]I would like to analyze the beta anomaly following the method used in the following paper "The low-risk anomaly: A decomposition into micro and macro effects" by (Baker et al, 2018). (the link: https://www.tandfonline.com/doi/full/10.2469/faj.v70.n2.2?needAccess=true) I construct...
I would like to analyze the beta anomaly following the method used in the following paper "The low-risk anomaly: A decomposition into micro and macro effects" by (Baker et al, 2018). (the link: https://www.tandfonline.com/doi/full/10.2469/faj.v70.n2.2?needAccess=true) I constructed the quintiles and ran the regression...
I'm curious about the typical markup on quoted exotic options as well as what drives this premium. You call up an options desk for a quote, and they'll give you a spread that reflects their market on the vol plus a bunch of other things. (This spread might be deflected based on inventory, but let's ignore this aspec...
What's the typical markup on quoted exotics, and what drives this premium?
I'm curious about the typical markup on quoted exotic options as well as what drives this premium. You call up an options desk for a quote, and they'll give you a spread that reflects their market on the vol plus a bunch of other things. (This spread might be deflected based on inventory, but let's ignore this aspec...
I'm curious about the typical markup on quoted exotic options as well as what drives this premium. You call up an options desk for a quote, and they'll give you a spread that reflects their market on the vol plus a bunch of other things. (This spread might be deflected based on inventory, but let's ignore this aspec...
I want to ask questions about the gamma smoothing as suggested in this answer: https://quant.stackexchange.com/questions/35186/delta-hedging-on-barrier-digital-options. I'm wondering if there is mathematical proof as to why the second answer works. Meaning if I reprice a vanilla option of strike K, with a stripe of v...
I couldn't help but notice that in all stochastic volatility models articles I consulted, whenever Ito lema is applied with a process of the sort $$\frac{d S_t}{S_t} = \sigma_t d W_t $$ With $(\sigma_t)$ being a stochastic process. It's considered that $$d<S_t> = S_t^2 \sigma_t^2 dt$$ Is this justified? Given...
If I'm entering into a Market order to buy (e.g., for a share of SPY), it's easy to see the spread that I am crossing: I can compare the "mid" average of the NBBO to the ask, and that's the spread I paid. So generally during trading hours, this would be \$0.005 for SPY (implying a $0.01 round-trip spread for SPY). W...
Do MarketOnClose orders cross a bid-ask spread?
I'm curious about the typical markup on quoted exotic options as well as what drives this premium. You call up an options desk for a quote, and they'll give you a spread that reflects their market on the vol plus a bunch of other things. (This spread might be deflected based on inventory, but let's ignore this aspec...
I had a thought experiment: suppose you wanted to borrow an equity security from me (perhaps to short sell it). I ask you for collateral and a borrow fee, and in exchange you get the stock. If you give me cash collateral, I will buy Treasuries and make the risk-free rate until you cover. In a year, you give me back ...
Are risk-free-rate bonds and cash fungible?
Sniffing (or stalking) algo indeed detects other algorithms. How does that work in practice? Imagine the order book for a particular equity is: Bid 1 = 99 (size 10,000), Bid 2 = 98 (size 25,000), Bid 3 = 97 (size 30,000), Offer 1 = 101 (size 10,000), Offer 2 = 102 (size 25,000), Offer 3 = 103 (size 30,000). So i...
I am looking for historical market capitalization for: - SPX 500 index - MSCI EAFE index Bloomberg data for market capitalization oddly enough only seems to start in 2000s. Which other paid or free databases can I try? Edit: I am voting to reopen this. The duplicate question is a repository of databases a...
Cash is King. The way I see it is that they are not fungible because they have different market risk profiles, Cash is truly market risk neutral while government bonds are not. In your scenario, what would happen if the treasuries you bought with the cash collateral are down by the time of the short cover? you'd ...
I had a thought experiment: suppose you wanted to borrow an equity security from me (perhaps to short sell it). I ask you for collateral and a borrow fee, and in exchange you get the stock. If you give me cash collateral, I will buy Treasuries and make the risk-free rate until you cover. In a year, you give me back ...
I am missing something in the fixing rules for USD Libor: the fixing for the date `Aug 31th, 2022` is on `Aug 26th, 2022` - 3 business days ahead (checked in another system). However, I am defining a 2-day fixing in `index`. How come the correct date is `Aug 26th, 2022` and not 2-business days ahead `Aug 29th, 2022...
I have to solve the following PDE: \begin{equation} \begin{cases} \dfrac{\partial F}{\partial t}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial x^2}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial y^2}+\dfrac{1}{2}\dfrac{\partial^2 F}{\partial x\partial y}+y=0\\\\ F(t,x,y)=e^{x+y} \end{cases} \end{equation} In principle I ...
What are the next steps for pricing under the local volatility formula? It feels like I'm missing the trick (as I only see the numerical methods used to obtain prices after calculating local vol). I.e. I understand the *derivation* of the local volatility formula below but not the *application*: $$ \sigma_{local}...
How do I proceed with pricing after calculating local vol volatilities?
**To keep it brief:** *the realized variance estimator, $RV_t$, is only a consistent estimator of Quadratic Variation (QV) under absence of microstructure noise.* Following the paper of **[Barndorff‐Nielsen, O. E., & Shephard, N. (2002)](https://www.jstor.org/stable/3088799?seq=1)** they show how the realized varia...
- A bit confused here. Skew can mean so many different things. It can mean the different IVs along the strike axis (sometimes called vertical skew), can mean the IVs along term structure (sometimes called horizontal skew or calendar spreads); it might mean difference between call and put implied volatilities, or even ...
What does it mean to "sell skew to buy vol"?
I came across many interesting questions regarding carry and roll of swaps, bond futures and bonds. Now I found that [link][1] about the carry / roll of an asset swap. Reading that article two questions popped up: 1. The definition of carry of a (spot) starting swap I know is $$\frac{S(0, T) - F(0,\tau)}{DV01(Swap(...
I’ve been running an algo in paper trading (on Interactive Brokers) that I would like to switch over to live. It makes anywhere between 20-40 trades a day, which racks up a lot of commissions. Any suggestions about how to lower the commissions? FWIW, I trade just one Nasdaq stock. Thank you!
Suppose there's an option expiring in two weeks. It's trading at a steep discount, but I can't directly arb it because the closest contract expires in *4* weeks. Is there anything I can do? Generally, is there any way to replicate an option with time to expiry $t$ by trading in another with expiry $T > t$?
Can I replicate an option with time to expiry $t$ by trading in another with expiry $T > t$?
I came across many interesting questions regarding carry and roll of swaps, bond futures and bonds. Now I found that [link][1] about the carry / roll of an asset swap. Reading that article two questions popped up: 1. Now to the asset swap example. I have a bit of trouble of understanding the usage of the ASW data...
I decided to split the first part of my original [question][1] into this separate one as they are somewhat unrelated. The definition of carry of a (spot) starting swap I know is $$\frac{S(0, T) - F(0,\tau)}{DV01(Swap(\tau, T-\tau))}\tag{1}$$ where $S(0,T)$ is the swap rate for maturity $T$, $F(0,\tau)$ is the fixin...
Why is this approximation of carry valid?
Swaps: Why is this approximation of carry valid?
How to derive Dupire's local volatility?
I want to calculate the expression of local volatility expressed in terms of implied volatility given by Fabrice Douglas Rouah in [Derivation of Local Volatility][1] : $v_{l} = \frac{ \frac{\partial w}{\partial T} }{\left[1 - \frac{y}{w} \frac{\partial w}{\partial y}+ \frac{1}{2}\frac{\partial^2 w}{\partial y^2}+ \...
*"What is meant by future's matched maturity ASW...?"* My understanding is as follow: trade the future vs. a forward starting swap with the swap start date on the first delivery date of the futures contract and the swap end date on the day the CTD bond matures. The matched maturity swap spread is the difference betw...
Suppose that we have a stock $X_t$ valued at 100 euros per share. At each time step the price can go up or down 1 euro with prob $1/2$. Assuming that interest rates are $0$ and the volatility of the asset at time $t$ is defined as $$vol(X_t)=\frac{\sqrt{\mathbb{E}[X_{t+1}^2\mid X_t]-\mathbb{E}[X_{t+1}\mid X_t]^2}}{...
Suppose there's a salesman who will always sell me an option expiring in two weeks. His options trade at a steep discount, but I can't directly arb it because the closest exchange-traded contract expires in *4* weeks. Is there anything I can do, other than waiting for two weeks? Generally, is there any way to replic...
I use Interactive Brokers and have a subscription to their NASDAQ data. I use it to get near real-time data for the stock PLUG. I used to get streaming 5-sec bars and aggregate them into 1-min bars, but noticed that the data was different than if pulled again a few minutes later for the same time period. To correct ...
I use Interactive Brokers and have a subscription to their NASDAQ data. I use it to get near real-time data for the stock PLUG. I used to get streaming 5-sec bars and aggregate them into 1-min bars, but noticed that the data was different than if pulled again a few minutes later for the same time period. To correct ...
Wanted to ask if a single or different volatilities should be used in Reiner-Rubinstein's option barrier pricing formulas given the following: An Up-and-out call (Cuo) with strike K and barrier H is valued as Cuo = C - Cui where C is a plain vanilla call with strike K and Cui is an up-and-in barrier call. The fi...
Your question is twofold * How a market maker should adjust its quotes on a vol surface with respect to his inventory? * How to adjust the vol surface when a new trade is observed on the markets? Let me focus on the market making question, and that for you need to be familiar with optimal trading and optimal mar...
Wanted to ask if a single or different volatilities should be used in Reiner-Rubinstein's option barrier pricing formulas given the following: An Up-and-out call (Cuo) with strike K and barrier H is valued as Cuo = C - Cui where C is a plain vanilla call with strike K and Cui is an up-and-in barrier call. The fi...
If I understood right that you have in mind the formulas for Barrier options in the Black-Scholes model, you must use a single volatility. It is tempting, but wrong, to plug in Smile volatilities at strike and barrier levels. We know that the true market, there is a smile, so the single volatility model is wrong. In...
A **market on close** order is usually an order that is reversed for the closing auction. When such orders not designed by exchanges, brokers are emulating them. For instance, if an exchange does not provides this feature inside its **matching engine**, your broker can build a mechanism that will retain your order...
I use Interactive Brokers and have a subscription to their NASDAQ data. I use it to get near real-time data for the stock PLUG. I used to get streaming 5-sec bars and aggregate them into 1-min bars, but noticed that the data was different than if pulled again a few minutes later for the same time period. To correct ...
Does anyone have any hypothesis why, for options on a future series, vertical spreads priced at half the strike difference should exhibit the same strike across all expirations, regardless of term structure? For example, as of early Sep 2022, with VIX futures in contango ranging from around 25 to 28 and VIX itself a...
I want to create an app that centralizes all the customer's investment accounts into one platform where they can view/monitor their trading positions across all brokerage accounts. How do apps like Mint, or Interactive Brokers do this?
How do Personal Finance companies get access to their customers investment accounts?
I have a question for estimating factor return. I’ve found that there seems to be 2 methods for estimating factor return. First, with return of an asset i(r_i) and factor loadings such as PER, EPS, Momentum etc(B_i), factor return can be estimated by doing regression - cross sectional regression Second, sorting a...
I recently conducted a project for university, where I calculated the risk factors of the Fama-French 3Factor Model. For "SMB", the "size-premium", I get a negative result. What exactly does that tell me? How do I interpret this?
How to interpret the results of Fama-MacBeth regressions?
I am relatively new to repos and I am trying to find out whether there is a standard practice for calculating balance sheet value of a repo. Are there any regulations that prescribe how banks shall calculate balance sheet value of a repo? Would the following approach make sense for a fixed rate term repo? $$V(t) = N\l...
I am relatively new to repos and I am trying to find out whether there is a standard practice for calculating balance sheet value of a repo. Are there any regulations that prescribe how banks shall calculate balance sheet value of a repo? Would the following approach make sense for a fixed rate term repo? $$V(t) = N\l...
I have a long-standing confusion around the truncation range of the COS method proposed by Fang and Oosterlee, that is I found the results are highly volatile given different truncation ranges. To be more specific, given the following three truncation ranges (which I am aware is merely a rule of thumb): $$ [a_{2},...
I thought I read/heard somewhere that annualized volatility, using monthly returns vs daily returns is usually lower. With that said, I can't seem to find any papers on this. Does anyone have any studies that looks at annualized volatility using different return calculation time frames? I'm tempted to use daily ...
Daily vs Monthly vs. other return for volatility calculation?
I am trying to price a call on zero coupon bond under the Vasicek model by Monte Carlo method. But the thing is my result is very different of what I have to find (0.095 find by closed form formulas). Could you please expose my code errors or maths errors ?\ Here is what I have done:\ Let $(Ω, (\mathcal{F}_t)_t, \ma...