instruction
stringlengths
15
26.1k
I have a question regarding the day count conventions for T-bills, T-notes and T-bonds. So far I haven't found an official page that clearly states which method is used and I don't own bloomberg etc. to look it up myself. I have also looked at the TreasuryDirect website but it is not there either. However, Investopedia...
So, I suppose, in method one, what I'm getting is the geometric mean and geometric standard deviaton. The data that I had used spanned 25 years, [1996-2020]. Transforming the daily returns to log, taking the arithmetic mean in log space, and then multiplying by the number of observations in a year, then reversing the l...
If I understand correctly your question is: ### Question If I ran PCA and someone else runs PCA and the result is completely different then what good is PCA? Does it make sense to use it for risk management? ### Answer If you would get a different outcome due to small changes in the data it would be bad mea...
*Question 1 I often read by research desk that ASW-spread have widened or tighten without concrete reference to the bond. As said above, the asset swap spread depends on the credit quality of the swapped bond. So is there a market standard for this? If people talk about USD, do they mean swapped Treasuries, in EUR swap...
I have an intraday trading strategy so I take several positions each day. I have prices for each stock, with a 10 second resolution. So the data looks like this: 09:00:00 $100 09:00:10 $101 09:00:20 $99 09:00:30 $97 ... So I can calculate the return for each 10s interval. Then I su...
Sharpe ratio from second returns? HFT
I would like to ask you for an advice of any of you could help me with this information it would be really helpful. I am trying to build a reinforcement learning trading bot that based on the current and past stock data it will try to predict when its the perfect moment for buying or selling a stock. But my problem...
I’m reading an article found here: https://www.gwlrealtyadvisors.com/research_report/yielding-perspective-cap-rates-discount-rates-and-relative-value-for-real-estate/. The article mentions the relationship between the discount rate/cap rate spread, and NOI. The author shows that the discount rate/cap rate spread mo...
The link between discount rates and cap rates?
I’m reading an article found here: https://www.gwlrealtyadvisors.com/research_report/yielding-perspective-cap-rates-discount-rates-and-relative-value-for-real-estate/. The article mentions the relationship between the discount rate/cap rate spread, and NOI. The author shows that the discount rate/cap rate spread mo...
Discount rate is a rate at which future cash flows are deflated to current dollars. Lets assume we have a real estate asset producing a series of payments in perpetuity: $$ C_0, C_1, C_2, ... $$ If the payment amount is fixed ($C_0$ = $C_i$), the present value of these payments can be calculated as follows: ...
Jump-diffusion models (as Merton) have following SDE: $$dS_t=\mu S_tdt+\sigma S_t dW_t+S_tdJ_t$$ where $$J_t=\sum_{i=1}^{N_t}(\xi_i - 1)$$ $\xi_i$ - i.i.dn $N_t$ - Poisson process Do we in Euler scheme have sth like this? ### $$S_{t+\Delta t}=S_t+\mu S_t\Delta t+\sigma S_t\Delta W_t+S_t\Delta J_t$$ where $$\D...
I am implementing a monte carlo to price various options using a local volatility model. The implied volatility surface from which the local volatility is derived is a function of logmoneyness and expiry : $ \sigma_{implied} (log(F/K), T) $. When using only the implied volatility to price a european option for ex...
I am implementing a monte carlo to price various options using a local volatility model. The implied volatility surface from which the local volatility is derived is a function of logmoneyness and expiry : $ \sigma_{implied} (log(F/K), T) $. When using only the implied volatility to price a european option for ex...
To add to above answer, this [GARP article][1] is summarizing recent work on new benchmark indices that attempt to address what Libor was meant to ('fairly') cover, but RFR’s don't, namely funding and some credit sensitivity: Ameribor, AXI, US Dollar ICE Bank Yield Index etc.. One banker points out there that an inde...
To add to above answer, this [GARP article][1] is summarizing recent work on new benchmark indices that attempt to address what Libor was meant to ('fairly') cover, but RFR’s don't, namely (term, unsecured) funding and some credit sensitivity: Ameribor, AXI, US Dollar ICE Bank Yield Index etc.. One banker points out ...
To add to above answer, this [GARP article][1] is summarizing recent work on new benchmark indices that attempt to address what Libor was meant to ('fairly') cover, but RFR’s don't, namely (term, unsecured) funding and some credit sensitivity: Ameribor, AXI, US Dollar ICE Bank Yield Index etc.. One banker points out ...
How is Inverse Super Floater built?
Good afternoon, I am currently following Carr and Wu (2009) to compute variance risk premia from options written as (RV-EV)*100 for the payoff of a long var swap position. Now I want to see whether my computations are statistically significant by using the Python code: reg = smf.ols('df ~ df',data=df).fit(c...
Jump-diffusion models (as Merton) have following SDE: $$dS_t=\mu S_tdt+\sigma S_t dW_t+S_tdJ_t$$ where $$J_t=\sum_{i=1}^{N_t}(\xi_i - 1)$$ $\xi_i$ - i.i.dn $N_t$ - Poisson process Do we in Euler scheme have sth like this? ### $$S_{t+\Delta t}=S_t+\mu S_t\Delta t+\sigma S_t\Delta W_t+S_t\Delta J_t$$ where $$\D...
The gamma process is a Levy process $X$, where $X_t$ has gamma distribution with parameters $at,b>0$ and density $$f\left(x\right)=\frac{b^{at}}{\Gamma\left(at\right)}x^{at-1}e^{-bx}$$ I want to simulate gamma process by increments but what is the distribution of $X_t - X_s$? Of course gamma but with what parameter...
Consider the Heston (1993) model under the **real world measure** ($\mathbb{P}$) \begin{align*} \mathrm{d}S_t&=\mu^\mathbb{P} S_t\mathrm{d}t+\sqrt{v_t}S_t\mathrm{d}B_{S,t}^\mathbb{P}, \\ \mathrm{d}v_t&=\kappa^\mathbb{P} (\bar{v}^\mathbb{P}-v_t)\mathrm{d}t+\sigma^\mathbb{P}\sqrt{v_t}\mathrm{d}B_{v,t}^\mathbb{P}, \en...
I am new to quantitative finance so, please excuse me if the terms are not correct. I am trying to apply CAPM on a portfolio which has multiple indices (S&P 500, Russel 1000 and S&P Financials). The portfolio looks something like this : Stated market exposure ---> large cap, small cap, financials. How do I ...
I am trying to get the mechanic of the swap rollover. Funds usually hedge FX risk of their long term foreign assets (eg UST) with short term FX swaps (usually maturity < 1yr), by rolling over fx swaps during the life of the trade. Can you show with a numerical example how the process works?
The price of an American put option can be written as the following optimal stopping problem: $V(0) = \mathop {\sup }\limits_{\tau \in \mathcal{T}} {\mathbb{E}^\mathbb{Q}}\left[ {{e^{ - r\tau }}\max [K - S(\tau ),0]} \right]$, where $\mathcal{T}$ is the set of all stopping (exercise) times. Assume no-dividend case. ...
You could but there are difficulties associated with this approach. The main one is that $\tau$ is stochastic, ie it is different for different paths of $S$, so the standard Black-Scholes formula does not apply. For example some $\tau$s you need to check are of the form $\tau =\inf\{t : S(t) <B\}$ in which case you nee...
How to show the following equation holds?
How to show the following conditional expectation holds for a Brownian motion?
Commonly, we employ the Euler scheme for $\Delta\ln(S_t)$, not for $\Delta S_t$. Let us specify the jump part as $$ S_{t+}=S_{t}J\Rightarrow dS_t=S_t(J-1) $$ where $J$ is a strictly positive random variable. (*NB: Under Merton we would have $\ln(J)\sim N(\mu_J,\sigma_J^2)$ and $\mathrm{E}(J)=e^{\mu_J+\frac{1...
Commonly, we employ the Euler scheme for $\Delta\ln(S_t)$, not for $\Delta S_t$. Let us specify the jump part as $$ S_{t+}=S_{t}J\Rightarrow dS_t=S_t(J-1) $$ where $J$ is a strictly positive random variable. (*NB: Under Merton we would have $\ln(J)\sim N(\mu_J,\sigma_J^2)$ and $\mathrm{E}(J)=e^{\mu_J+\frac{1...
I hope you can help me again regarding pricing an arithmetic Asian option. Assume we have a time grid $(0=t_0,t_1,t_2=T)$ and we buy an Asian option at time 0 and the maturity is at T. Now we would like to price the option at each time with a Monte-Carlo simulation. Now assume the risk-free rate and the strike $K=0...
How to show the following conditional expectation relation holds for a Brownian motion?
Many people who are interested in algo/quant trading must have faced the same question before: how do I set up my own database from scratch? I think much effort has been duplicated when we brainstorm the schematics and feed the same yahoo finance/quandl data to own database. What is the quickest way to start a da...
What is the quickest way to start a database for algo trading from scratch?
I have some ideas about Asian options that I would like to test with historical market data. I am therefore looking for some fairly liquid Asian options markets, preferably ones with publicly available price data. **Question:** Does anyone know any examples of such markets and sources of corresponding price data? --...
What are some liquid Asian options markets?
I was reading about OAS and I'm wonder how one could "extract" the OAS out of a product by hedging out all the other risks. One of the explanations I got from OAS from a book was this: "Essentially a positive OAS implies that once hedged against the forward LIBOR rates, a security will have positive returns". T...
Extracting the OAS out of an MBS?
I am trying to replicate certain aspects of the following paper: ["Does the stock market fully value intangibles? Employee satisfaction and equity prices" - Alex Edmans (2011)](http://faculty.london.edu/aedmans/Rowe.pdf) for three European countries (GER, FR, UK). I am interested in replicating the following regres...
I'm posting this as a proof that speed data-ing is possible in the world databases. ### Step 1: Install database - 2 minutes Install [Axibase TSD](https://axibase.com/docs/atsd/finance/?qsed=63059) (_my affiliation_) as a Docker container. Alternatively, install it directly on a [Linux](https://axibase.com/docs/a...
In the code below, you can see that 'ret' is an ARMA process, and I am trying to see how the ret[0], etc... ret3, ret4, etc. are linked to each other, and although I know the formula for the ARMA process (see it below) , I cannot manually reproduce e.g ret[4] from the previous values... Any help? [![enter image de...
What is the expectation of a change in Brownian motion?
I'm posting this as a proof that speed data-ing is possible in the world of databases. ### Step 1: Install database - 2 minutes Install Axibase TSD (_my affiliation_) as a Docker container. Alternatively, install it directly on a [Linux](https://axibase.com/docs/atsd/finance/install.html?qsed=63067) host. ```d...
It's not clear what you're trying to accomplish by applying CAPM, or it that a goal in itself? For example, you could, for each stock in your universe, calculate the historical $\rho$ to each of the indices. Then use the index with the highest $\rho$ for this stock. (If you see negative $\rho$'s, then you may need m...
When pricing a defaultable zero-coupon bond the risk-neutral price is given as the expected value of the discounted payoff of the bond under a risk-neutral measure. 1. My first question is how do we know that there is a measure with respect to which the discounted price process of the bond is a martingale? 2. In ...
I hope you can help me again regarding pricing an arithmetic Asian option. Assume we have a time grid $(0=t_0,t_1,t_2=T)$ and we buy an Asian option at time 0 and the maturity is at T. Now we would like to price the option at each time with a Monte-Carlo simulation. Now assume the risk-free rate and the strike $K=0...
I’ve been thinking about this for awhile and couldn’t figure it out myself. Assume you have a trading strategy, which return is normally distributed. strategy return has a mean of 1 basis point and a standard deviation of 20 basis points. Now, how many times do you have to run this strategy so there’s a 99% chance you...
Jump-diffusion models (as Merton) have following SDE: $$dS_t=\mu S_tdt+\sigma S_t dW_t+S_tdJ_t$$ where $$J_t=\sum_{i=1}^{N_t}(\xi_i - 1)$$ $\xi_i$ - i.i.dn $N_t$ - Poisson process Do we in Euler scheme have sth like this? ### $$S_{t+\Delta t}=S_t+\mu S_t\Delta t+\sigma S_t\Delta W_t+S_t\Delta J_t$$ where $$\D...
How can I sort mutual fund data from WRDS by using their conditional statement feature?
*Is there any other factor missing in this picture?* There is a large body of academic and practitioner literature on modeling exchange rates. Factors might include inflation, productivity, ToT, government deficits or debt, real rates... You might start by reading this piece, for example - https://www.imf.org/extern...
When pricing a defaultable zero-coupon bond the risk-neutral price is given as the expected value of the discounted payoff of the bond under a risk-neutral measure. 1. My first question is how do we know that there is a measure with respect to which the discounted price process of the bond is a martingale? 2. In ...
I have identified around 20 interesting statistics for a universe of stocks, regarding metrics of size, growth, valuation, quality, risk. Think market cap, free float, average daily volume. The universe encompasses around 200 stocks. I'd like to build a scoring model based on data from Bloomberg. For some of the statis...
The setting ----------- Let stocks $A$, $B$, and $C$ are cointegrated. Moreover, we know the weights of the cointegrated portfolio (scaled so that the absolute value of the maximum weight is $0.5$): - $w_A = 0.15$ - $w_B = 0.35$ - $w_C = -0.5$ And one fine day, the cointegrated portfolio - a stationary tim...
I'm using VCUB on Bloomberg for ATM cap volatilities and have noticed there are a few "flavors" of volatilities. I would like simply use ATM flat vols to bootstrap forward volatilities from caplets using Black's formula. In this case, I am assuming that Black Vol (IBOR) would be the correct choice for obtaining dat...
What is the correct volatility to use for inverting Black76?
Hey in [this][1] text is described the Milstein formula (3.5) for simulation SDE with jump component. How it is calculated? In this formula we also have to compute value of a Wiener process in a jump time, how to do it? I think that simualtion of a Poisson process by increment will be insufficient in this situation. Or...
I have identified around 20 interesting statistics for a universe of stocks, regarding metrics of size, growth, valuation, quality, risk. Think market cap, free float, average daily volume. The universe encompasses around 200 stocks. I'd like to build a scoring model based on data from Bloomberg. For some of the statis...
I have identified around 20 interesting statistics for a universe of stocks, regarding metrics of size, growth, valuation, quality, risk. Think market cap, free float, average daily volume. The universe encompasses around 200 stocks. I'd like to build a scoring model based on data from Bloomberg. This model is supposed...
I have a portfolio consisting of several assets and I'm using daily data to calculate various portfolio metrics, including historical returns and volatility. In order to compare portfolio performance to other performance metrics I'd like to annualize both returns and volatility. With returns, it seems pretty simple...
I am trying to calculate an implied one-day move value for an instrument given its historical volatility. While I am familiar with this formula for *implied* volatility to implied move:[![formula][1]][1] and intuition suggests this formula would hold true also for *historical* volatility, I am given pause by the o...
Hey in [this][1] report (*Approximation of Jump Diffusions in Finance and Economics* by Bruti-Liberati and Platen) is described the Milstein formula (3.5) for simulation SDE with jump component. How it is calculated? In this formula we also have to compute value of a Wiener process in a jump time, how to do it? I think...
Novy-Marx Profitability "Excess" returns - What does Excess mean here?
I'm trying to calibrate Local stochastic volatility model using finite difference method, and I'm mainly following this referece: [Tian (2015)][1]. However, I met a problem when calibrating leverage function - the discritized fokker planck equation with ADI Douglas scheme will generate negative density, which leads...
I'm trying to calibrate Local stochastic volatility model using finite difference method, and I'm mainly following this referece: [Tian (2015)][1]. I met a problem when calibrating leverage function - the discritized fokker planck equation with ADI Douglas scheme will generate negative density, which leads to negat...
We'd like to offer a product in which a notional amount (N) is given, and the underlying is spread (s) defined as 30Y yield minus 10Y yield (both from treasury YTM yield curve). At the end of the trade, we give the client N ×(s_t-s_0)in excahnge for transaction fee equal N times some bps. How can I hedge my position...
How do I hedge yield spread?
We'd like to offer a product in which a notional amount $(N)$ is given, and the underlying is spread $(s)$ defined as 30Y yield minus 10Y yield (both from treasury YTM yield curve). At the end of the trade, we give the client $N \cdot(s_t-s_0)$ in exchange for a transaction fee equal $N$ times some bps. How can I he...
I feel that it depends on who's writing the research, and on their personal idiosyncratic preferences. For example, picking a random [credit research piece][1], we see >Asset-swap spreads in the secondary market widened modestly by 1.3bp and another random [piece][2] from the same team: >Asset-swap spreads ...
I feel that it depends on who's writing the research, and on their personal idiosyncratic preferences. For example, picking a random [credit research piece][1], we see >Asset-swap spreads in the secondary market widened modestly by 1.3bp and another random [piece][2] from the same team: >Asset-swap spreads ...
We'd like to offer a product in which a notional amount $(N)$ is given, and the underlying is spread $(s)$ defined as 30Y yield minus 10Y yield (both from treasury YTM yield curve). At the end of the trade, we give the client $N \cdot(s_t-s_0)$ in exchange for a transaction fee equal $N$ times some bps. How can I he...
I want to make index for the bond market, I read several methodologies and I didn't find a divisor in the equations used for bond index calculation. As i know from the stock indices that a divisor is used to ensure that (corporate actions/new re balancing for index constituents) do not significantly alter the index....
How do I calculate the bond index in case of the presence of corporate actions? to prevent a change in the value of index due to corporate actions?
Is this all that there is to this product, no early termination, no embedded caps, floors, minimums, maxiumums, or any other optionality? If the curve inverts so much that 10Y>30Y at time _t_, will the client pay you instead? As currently described, the cash flow at _t_ simply has sensitivities to two yields that no...
*perhaps an explanation of (or resource on) this often glaring difference between the two?* IV is forward looking and should include some risk premium. My 2c is the best reference is "Volatility Trading" by Euan Sinclair; IIRC, "Option Trading", by the same author, is an introductory version.
Several sources suggest 70% or so of Stock Market (S&P 500) gains are from Dividend payments (according to several sources, below) But dividend payments average for the S&P 500 have been about 1.9 to 3% for the last 30 years. But total return is around 9.5%. That suggests that Dividends are about 1/3 of gains. ...
How much of historic S&P500 gains are from price appreciation vs. dividends?
First, couple of corrections (I am not sure, just guessing): 1. $X_T$ - is it strike or price of forward underlying? Let it be strike, $X$ and the underlying is $S_t$ with forward: $Fwd_T=S_t/D_T$. 2. > Breeden and Litzenberger formula: No, B&L formula is this: $PDF(S_T)=D_T\cdot\frac{d^2C(X)}{dX^2}$, whe...
I would like to calculate the real domestic return of a foreign asset ---- What I know Real price is $$P_{Real, t} = \frac{P_{Nominal, t}}{CPI_t}$$ where CPI is consumer price index. And I know that the nominal domestic return of a foreign asset is calculated as follows: $$R_{Nominal, Domestic, t} =...
The Fed’s historical chart of the 10 year treasury yield is titled “10-Year Treasury Constant Maturity.” How exactly is the yield calculated?
How is the “constant maturity” 10 year treasury calculated?
How does one run an autocorrelation when there are blanks in the dataset? I have a dataset of interest rates and I am plotting day x vs day x-1. I’m unable to run a correlation in Excel if there are blanks. How do you recommend proceeding?
Running an autocorrelation with blanks?
We'd like to offer a product in which a notional amount $(N)$ is given, and the underlying is spread $(s)$ defined as 30Y yield minus 10Y yield (both from treasury YTM yield curve). At the end of the trade, we give the client $N \cdot(s_t-s_0)$ in exchange for a transaction fee equal $N$ times some bps. How can I he...
We'd like to offer a product in which a notional amount $(N)$ is given, and the underlying is spread $(s)$ defined as 30Y yield minus 10Y yield (both from treasury YTM yield curve). At the end of the trade, we give the client $N \cdot(s_t-s_0)$ in exchange for a transaction fee equal $N$ times some bps. How can I he...
We'd like to offer a product in which a notional amount $(N)$ is given, and the underlying is spread $(s)$ defined as, say, 30Y yield minus 10Y yield (both from treasury YTM yield curve). At the end of the trade, we give the client $N \cdot(s_t-s_0)$ in exchange for a transaction fee equal $N$ times some bps. How ca...
Appears to work when using ql.MakeOIS. Still need to understand why there is a discrepancy. Any thoughts? **Reprice Quotes** ```python for quote in marketQuotes: swapTenor = ql.Period(quote[0]) fixedRate = quote[1]/100 oisSwap = ql.MakeOIS(swapTenor, sofrIndex, fixedRate, nominal=1E6) print(q...
We are looking at trading a sterling OIS swap (OTC) and I can't find the specifics of the conventions anywhere. People tell me that because Sonia is an overnight rate, you use the preceding rate. So the Bank publish the SONIA for the 30th March at 9am on the 31st March, it's timestamped 30th, and the market uses that a...
I am currently deriving Black-Scholes formula, and i get the following equation when Im doing the Tayler expansion: $dG=\frac{\partial G}{\partial S}dS+\frac{\partial G}{\partial t}dt+\frac{1}{2}\frac{\partial^{2}G}{\partial S^{2}}dS^{2}+\frac{1}{2}\frac{\partial^{2}G}{\partial t^{2}}dt^{2}+\frac{\partial^{2}G}{\par...
Are you dealing with overnight rates, such as Fed Funds? In such cases the same rate continues to be paid while the markets are closed. So for example if FF is X on Friday, it means you will earn X for three days: Saturday, Sunday and Monday. In this sense, there are no "blanks" in interest rate data, you earn so...
I would like to build a model to predict capital calls and distributions of a private equity fund. The first question is: does any of you can address me towards the state of art for it? also machine learning approaches are more than welcome (so far I have only found papers using ito's calculus, or other deterministic ...
Are you dealing with overnight rates, such as Fed Funds? In such cases the same rate continues to be paid while the markets are closed. So for example if FF is X on Friday, it means you will earn X for three days: Saturday, Sunday and Monday. In this sense, there are no "blanks" in interest rate data, you earn so...
So I'm wanting to know if my call option will be worth more than its intrinsic value and also if lets say it ends up being worth 20k will people be buying it on the market ?
Will an options contract always be worth more than it's intrinsic value ? Also if it's very expensive, will it be hard to sell?
I'm trying to calibrate Local stochastic volatility model using finite difference method, and I'm mainly following this referece: [Tian (2015)][1]. I met a problem when calibrating leverage function - the discritized fokker planck equation with ADI Douglas scheme will generate negative density, which leads to negat...
This might be silly or basic question but I'm wondering how do a market makers do decide on fixing an option IV on certain level ? how do they do theirs calculations ? Thank you
How do market makers calculate the IV for options?
I've been using thousands of simulated stock price series generated with mean and standard deviation of daily returns and Geometric Brownian Motion, and then running these simulated price series through the Bjerksund Stensland 2002 option pricing model to generate thousands of simulations of option prices. Up to thi...
Do simulated values for IV need to be linked to the simulated series of underlying prices when used together in a Monte Carlo Simulation?
Why does this source, https://web.archive.org/web/20110219163448/http://howtohft.wordpress.com/2011/02/15/how-to-build-a-fast-limit-order-book/, suggest using red black trees/balanced binary trees? Why are they algorithmically ideal?
Why do people suggest using red black trees/balanced binary trees for the levels in a limit order book? Why are they algorithmically ideal?