instruction
stringlengths
35
27.7k
Suppose you know the following: there are 2-month European call and put options on an index-like instrument with no dividends, the calculations show that the call option price is USD 10.1150, the spot index price is USD 120, the risk-free rate is 3% and the volatility is 35%. You happen to know that the put option pric...
The following derivation produces a moment closure problem - I would appreciate any insight. It may seem trivial at first glance, but the key aspect is the integrand dependence on $t$. Consider $W_t$ to be a typical Brownian motion. Introduce the process $$ X_t = \int\limits_0^t dW_s G_{s-t} $$ where $G_0=1$, and $\mat...
I am looking to run Fama-French regression on a portfolio of stocks. I am looking to specify a regime using a dummy variable. This dummy variable could be a low volatility/ high volatility marker. Instead of using Markov model, I want to specify it explicitly. So when the vol is high, does the fund manager invest in qu...
Suppose the diffusion process for the short rate $r_t$ under the risk-neutral measure $Q$ is given by: $$ dr_t = \theta(t)dt+\sigma dZ_t $$ where $Z_t$ is a Brownian motion. I am trying to show that the parameter $\theta(t)$ is related to the slope of forward rate curve: $$ \theta(t) = \left. \frac{\partial F}{\partial...
I have a dataset of 9 variables and I want to fit a t-copula to them in order to construct a multivariate and after that resample from it. I am using Matlab. rng default % For reproducibility [Rho, nu] = copulafit('t',[A B C D E F G H L],'Method', 'ML'); r = copularnd('t',Rho,nu,1000); % I resample 1000 sample from i...
I am new to the field, and trying to understand structure of spot currency market. As it is stated here, Quote-Driven Market ... only displays the bid and asks offers for a security from designated market makers, dealers, or specialists. These market makers will post the bid and ask price that they are willing to acce...
I am to figure out something, and can't find any reference. I wonder: does it make sense to talk of a delta or other greek of a strategy? It seems that you can't put a price exactly on a call spread for example, so would that mean that delta metrics for a call spread would be simply the deltas for each option of the ca...
Just come up with a 'simple' and interesting problem that I've been struggling to deal with for some time. Consider a filtered probability space $(\Omega, \mathcal{F}, \{\mathcal{F}_t\}_{t\in[0,T]},\mathbb{P})$ with usual conditions, where $T>0$ is a constant and the filtration is generated by a Brownian motion $W$ wit...
I noticed that in certain literature, like in CFA level 1, the theory put forth is that someone should prefer positively skewed returns as mean > median > mode. But why is that? Based on a simple graphical drawing (pardon the sloppiness): Wouldn't I prefer a negative skew? We could swap the numbers in the axis but eve...
For single-curve RFR bootstrapping, such as a SOFR-based discounting curve bootstrapped strictly using SOFR fixed-float OIS, I am trying to understand if convexity adjustments are technically necessary in the bootstrapping process to calculate the present values of the OIS coupons due to the payment lag (delay after th...
In the book Active Portfolio Management by Grinold and Kahn, on page 30, when it derives the characteristic portfolio $h_a$ for some characteristic vector $a$, the problem is set up as $$\min h^TVh$$ s.t. $h^ta=1$ Why do we not need to add the constraint that $1^Th=1$ ($h$ should be a weight vector of a portfolio) here...
so just trying to compute gamma PNL for some CB positions using Bloomberg data for delta/gamma. for a CB, BBG has delta 0.74 and Gamma 0.00524. if I want to compute the delta PNL and Gamma PNL for a position with market value $2,500,000(not face value) with equity shock of 15%, i.e. the underlying stock price moves up ...
I have tick and quote live data from Polygon and Interactive Brokers. Looking at the conditions I can't see info on market or iceberg orders: https://polygon.io/docs/get_v1_meta_conditions__ticktype__anchor https://www.interactivebrokers.com/en/index.php?f=7235 Per this related question Market, Limit and Cancellation...
Playing with Random Forest Classifier, I am wondering what could cause in a 80:20 split the test results to perform better than in a 90:10 split? With 2000+ data points and: with 80:20 split, considering only the test set, the model generates 150 signals with around 55% accuracy with 90:10 split, considering only the ...
Let $L(t, T_1, T_2)$ be the forward LIBOR rate at time $t$ for the period $T_1$ to $T_2$. If a security pays some multiple of $L(T_1, T_1, T_2)$ at time $T_1$, how can we show that the price of this is a linear combination of caplets with different strikes?
I wanted to know if there are any mention of what is optimal lookback period i.e. how many days, weeks, months or years of return data I should consider for constructing sharpe optimal portfolio and what should be the hold period and when should the portfolio be rebalanced? Ex. lets say if I have to make investments on...
Using the last 20 days of market return and some stocks return I made sharpe optimial portfolio and following were the stock names and investment proportion to be made. StockName InvProportion TATACHEM -0.008707056 COLPAL 0.076357499 BATAINDIA 0.240493162 NAVINFLUOR -0.102407233 ONGC 0.136...
I've been reading a book recently about trading ORB (Opening Range Breakout) in the futures market. I haven't been able to figure out when exactly the open is for futures. I know the futures market opens on Sunday at 5pm CST but am wondering what open should be used for a daily trading. Would the open be when trading r...
Sometimes there is a limit order inserted as the best sell/bid, but when my program sees the opportunity and places a market order immediately trying to hit it, it's canceled which causes a big slippage to my order. I am thinking maybe the limit order is fake and used to lure orders in the first place. I am not sure wh...
From Hull's paper, the implied default probability (lambda) = credit spread/(1-recovery rate). Therefore, we can infer that, as the recovery rate goes up, the lambda will also go up. Why is that? I think it does not obey the intuition.
I have got historical data for the index options. Now I am looking at backtesting some of my strategies with this historical data. I would like to backtest strategies like selling a straddle and adjusting it based on movement in the underlying (index). My Questions Which library/framework is best suited for it (zipline...
I am using Idzorek 2002 (https://faculty.fuqua.duke.edu/~charvey/Teaching/BA453_2006/Idzorek_onBL.pdf) as a reference to implement the BL model in R. I have specified the model in its standard form, but I find BL does not alter weights for assets classes where views are not specified. This is addressed briefly by Idzo...
I have implemented and calibrated recombining trees on Excel for the Vasicek, the Cox-Ingersoll-Ross, the Ho-Lee and the Black-Derman-Toy model. I now would like to price some options with these models and see how close they are to reality, for curiosity. However, I cannot think of any easy suitable option. I thought a...
So far, I have only been working on systems that track numerous stocks and evaluate which present the best opportunities at a given time. I have grown curious about building a day-trading system that tracks only one stock but looks for various patterns on the 1 minute timeframe. These patterns would be found through in...
I am working on some Black-Scholes stuff and currently investigating implied volatility (IV). I understand that the typical volatility smile can be viewed as a criticism of the assumption about constant volatility. However, I want to also look at this phenomenon from the view of the Black-Scholes model. So my questions...
if we assume: Current price: $0.25 Exercise price: $0.25 life: 3 years Risk free rate p.a: 0.2% volatility p.a: 85% The option cannot be exercised within the first 2 years, after 2 years, it is exercisable at anytime until expiry. How would you value this? I initially thought a Binomial tree but then thought that BSM w...
I have an option whose payoff depends on its value at two times $T_1$ and $T_2$ as follows. $$V(t) = \mathbb{E}^{Q}[\mathbb{1}_{S(T_1)>B} (S(T_2)-K)^+)],$$ where the stock price follows the GBM dynamics $\mathrm{d}S_t=\mu S_t \mathrm{d}t+\sigma S_t\mathrm{d}W_t$. How do I compute its value using BS approach?
Imagine that space Z is exposed to the FX risk (i.e., currency exchange rate risk ), and we aim to provide a hedging solution for that. One choice is to consider a currency-forward contract. I wonder how I can derive the value of the forward contract when the spot domestic and foreign rates are a stochastic process, fo...
I have a stochastic process $N(t)$ which is equal to $n$ with probability $P\{N(t) = n\}=\frac{\left(\lambda t \right)^{n}}{n!}e^{-\lambda t }$ where $t$ represents the time period. In other words, the corresponding process for a fixed $t$, is a random variable $N(t) \equiv N$ which is a (homogeneous) Poisson (point) p...
I have an exposure to 3 products. I have another 12 tradable products that I can use for hedging myself. I have the correlation matrix between the 15 (12+3) products. How can I use PCA to find the best hedge (selection among the 12 tradable products) ? Thank you for anyone who could help.
I have a forecasting model for 1-minute asset returns $y_t$ derived from trade data. (The assets are not very liquid.) The predictors of the model include the lagged target variable $y_{t-1}$, which also takes one of the top spots in the model's variable importance table. The partial dependence plot of $y_{t-1}$ shows ...
Suppose we have $A$ a $T \times N$ matrix of daily returns for an asset universe of $N$ items, $b$ a $(T,)$ vector of daily returns for a target asset, $x$ a $(N,)$ weighting vector. We want a portfolio that replicates daily returns $b$ as closely as possible, subject to the constraint that portfolio weights $x$ sum to...
Im doing my final thesis about implied volatility. In the last section I am talking (not too much deep) about volatility surface. Im using the figure below to show the differences between the real surface and the BS model surface. I would like to explain what is "level" and "term" in the axis of the left one. Thanks.
So im just a little cloudy on how shorting a stock drops the share price. I understand that you borrow, or set aside shares from your brokerage to then buy later at the origional price. My guess was that it just dropped because of the lack of shares available to buy since you are holding them instead of buying and sell...
Given a set of historical data and volatility of price in each day, how is it possible to determine a price to purchase a stock at each day? For example, I want to find a price like $125 and receive a signal to purchase a stock tomorrow. I am sorry if this question is simple, my background is not in Finance, and if you...
I am looking for a bit of advice. I have recently used to a new firm, which uses Value at Risk in a manner that is unfamiliar from previous places I have worked that I find less than ideal. Previous, I have seen it used as a simple desk level tool as a basic measue of risk to translate across strategies/assets/instrume...
I'm excited to ask my first question here! I'll try to describe the mean-reversion strategy with some background, then explain what I couldn't understand. The strategy is described in Earnest Chan's Algorithmic Trading, chapter 5, page 123. Earlier in the chapter the author proposes a constant roll return pricing model...
I want to create optimised portfolios in five different countries and calculate if the inclusion of cryptocurrencies or other alternative assets contribute to the diversification. I want to use something as a proxy for the risk free-rate that will be comparable to all the economies to calculate metrics such as the shar...
Given a time series of a set of N assets (let's say 100), how can I find the optimal portfolio, with the constraint that only n<N assets (let's say 10) can be in the portfolio? With 'optimal portfolio' I mean the 'efficient portfolio' (so minimum variance for a given return, or maximum return for a given variance). Wit...
I was reading Nassim Taleb's Paper: Fooled by Correlation and found it very informative. I had always struggled with finding value in correlation in Finance, especially seeing a lot of bad applications in the workplace, however this paper got me thinking. Would splitting up correlation into subsections as shown here ha...
When put-call symmetry holds $$ P(S_t,K) = C(K,S_t) = \frac{K}{S_t} C \left( S_t, \frac{S_t^2}{K} \right) $$ where $P$ is the market price of a put option and $C$ is the market price of a call option. The second equality above holds for homogeneous models which I am assuming. Since $P(S_t,K)$ is a (local) martingale, s...
The Online Portfolio Selection problem has been extensively researched over the years, and various models have been implemented in open-source projects on GitHub. However the theoretical frameworks of the papers are quite convenient for their authors and make assumptions that are incompatible with real-life trading (no...
https://www.bitmex.com/app/contract/ETHUSD https://www.bitmex.com/app/contract/ETHUSDM21 How do you apply stochastic quanto pricing formulas to quanto crypto futures and perpetuals? I can see couple limitations: There is no risk free rate in crypto currencies (BTC) to do domestic currency discounting in BTC with so m...
The SDE for the Brownian bridge is the following: $dY_t=\frac{b-Y(t)}{1-t}dt+dW(t)$ with solution: $Y(t)=Y(0)(1-t)+bt+(1-t)\int_0^t \dfrac{dW(s)}{1-s}$ Can someone help me on proving that $$\lim_{t\rightarrow 1^-} Y(t)=b$$ using the Dambis-Dubins-Schwarz theorem and the law of large numbers?
I have an "exotic" option that is a function of two interest rates (say 3m Libor at 1y maturity and 2y maturity). I assume both the rates follow sabr model (already calibrated to vanillas), so I have both the marginals fully defined. Price of this option is observable in the market. I assume Gaussian copula to model th...
I'm reading a book on swaps and author mentions in the typical attributes of swaps: "Discount curve: For present-value calculations (say, to calculate the current market value of the swap), what interest rates will we choose? And because interest rates vary by term, and a yield curve conveys a whole set of rates at onc...
Now I realise my own RSI values will never be exactly the same as those from Trading View (TV), as I don’t have the same data for the first 14 periods. However I would expect the two to converge, and they do. Most of the time the values only differ by about 0.1. This leads me to believe that there’s no issue with my al...
The idea for this question is more or less taken from a slight hint regarding how Universa Investments L.P. functions from Taleb's Antifragile (obviously the real case is far more complex but this is just a home implementation). Suppose you have a portfolio X, where 20% of X gets diverted into put options, more specifi...
If underlying stock prices are random walk in short term, then it doesn't matter where the price go. What we can definitely certain, is the high Theta in ATM options. Can we repeatedly sell weekly put, and roll over during expiry, regardless the price? Is this a good idea? Thanks.
I am currently doing the question on pricing the option with payoff: $$\max (S(S-K),0).$$ On the relevant question section, it's asked why would a bank be reluctant to sell such option? I can't really think of a convinced answer for this so would appreciate any thoughts here.
I have tried to calculate IV and log-moneyness (=log(S/K)) for different times to expiry (M = less than 1 month, Q = less than 1 quarter, S = less than 1/2 of an year, Y = less than 1 year, Y (+) = more than 1 year). Doing this I've plotted the IV-smile for Call-options: Notice that the IV-smile seems to "sharpen" whe...
I have been asked to select a n stocks among N stocks, to construct a portfolio. Some of them have have negative weekly returns on average. If I want to select these n stocks by constructing an 'optimal' portfolio using Markowitz theory, for example, does it make sense to remove the stocks with negative returns?
I'm trying to back out the LIBOR curves on Bloomberg. And I am using exactly the same instruments as BBG, i.e. 3-month LIBOR, followed by 6 EuroDollar Futures contracts (ED1, ..., ED6), and finally the swaps. The overall shape and magnitude of my curve is correct, however, for the zero rates at last two futures contrac...
I would like to carry out risk-adjusted return attribution using the M^2 excess return, such that i can express M^2 excess return = risk free rate + sharpe ratio x benchmark vol - benchmark return in terms of M^2 excess return = sum of w_i x MC_i where MC_i is the marginal contribution and w_i = weight in portfolio - w...
I just came across a blog post. I believe the answer is a correct approximation: http://tastytradenetwork.squarespace.com/tt/blog/probability-of-touching-both-sides I modified the question in the post to: What is the combined probability of the stock moving up to touch the short call strike but not touching the short p...
I have observed that IV is increasing with time to maturity by using market prices and plotting IV (from Black-Scholes) against log-moneyness, $\log(S_t/K)$. $S_t$ being the price of the stock at time $t$ and $K$ being the strike. Using Martingales we can prove that the call-option's payoff function - i.e. $\max(S_t-K,...
In the book Active Portfolio Management, when discussing components of expected return (page 92 in edition 2), the authors mention that the consensus expected excess return $\beta_n\mu_B$ is the expected excess return obtained if one accepts the benchmark as an ex ante efficient portfolio with expected excess return $\...
I am doing a little study on the relationship between ETF prices and NAVs. Using intraday tick data, I take the mid prices of an ETF and compare them to the NAVs that I compute from the mid prices of the constituents of the ETF's creation basket (including a cash component). For some ETFs, the two curves (ETF mid pric...
Take the typical disclaimer often seen where investment products can be found. Here is a sentence from the fine print of BlackRock's fundamental equity fund page: Performance data quoted represents past performance and is no guarantee of future results. I want to unpack this axiom just a bit more and tag on a statist...
I'm new to this stuff, and have the following question: In John C. Hulls book the following scenario is presented: on May 15 we enter into a contract to sell 1 mill barrels of oil for the market price on August 15. The oil future expiring on that day are 79 dollars. We can hedge our position by selling 1000 contracts (...
Start with a portfolio $p$ of $n$ shares, each with weight $x_i = \dfrac{1}{n}$ (for $i$ ranging from $1$ to $n$, discretely). Its return is given by: $$R_p=x_1R_1+\ldots+x_nR_n=\sum_{i=1}^{n}=x_iR_i\tag{1}$$ Additionally, the variance of its return is given by: $$Var\left(R_p\right)=Cov\left(R_p, R_p\right)=Cov\left(\...
Did you see real-world examples of a way to estimate an individual's risk-aversion roughly by making mini-surveys to individuals or making them play mini-games? Do portfolio management companies do such things for their customers? Thanks in advance
Let say a bank enters an Interest rate swap with a counter-party, and this trade is collateralised. I have heard about a specific term in such collateral agreement, wherein it states that the interest payment on such collateral (which is received or paid) is floored at zero. What does it mean actually. If I receive the...
I have the zero rates at certain time nodes, say 3-month, 5-month, 8-month,...,2-yr,... Now I want to interpolate the curve so that the implied one-month forward rates are piecewise linear. That is, between two nodes, the forward rates are linear. I have no idea where to start. Can someone help?
So I am using the Bloomberg Excel add in but can also use the API. My dilemma is I have a list of tickers containing SP500 historical constituents and I have retrieved 600 of them from an alternative source who supply fundamental data such as revenue. However, for the delisted ones Bloomberg seems the only place that h...
I am trying to understand the difference and similarities between Credit Spread Risk and Credit Default Risk. Here is brief (and not all too precise) definition. Credit Spread Risk: Losses due to changes in credit spreads - measured using a Value-at-Risk (VaR) approach. Credit Default Risk: Losses due to changes in PD...
I was reading about exotic options and I came across something new. One touch down no touch up option and the other one I saw was One touch up no touch down option. I would like to understand how it works. Does it payout when the barrier is touched or on the expiration date of the option? A regular one-touch option pay...
I am implementing LSMC to price American options based on a custom model. I now need to make a choice of basis functions, so I am looking for the theoretical justification for using Laguerre polynomials in the Longstaff Schwartz paper. The section "8.3 Choice of basis functions" in the Longstaff Schwartz paper seems to...
The formula of $Gamma = (Vplus + Vminus - 2V0)/(V0 * dS^2)$, where $V$ is the contract value, $S$ is the stock price. We also know that $Gamma = (Dplus-Dminus)/(Splus-Sminus)$, where $D$ is the contract Delta, $Splus = S0 + dS$, $Sminus = S0 - dS$, $Dplus = (Vplus - V0)/(V0 * dS)$, $Dminus = (V0 - Vminus)/(V0 * dS)...
I have few doubts regarding transition from IBOR to SOFR rates. How will the method of calculating/estimating curve rates change after changing to SOFR? Will there be any change in valuation methodology in plotting future cash flows or will the existing methodology continue? In Bloomberg, the curve for fixed-floatin...
I used the PortfolioDataRequest aspect of the Bloomberg API in C++; however, when attempting to request the portfolio of the TAIL US EQUITY (an ETF), it returns an invalid symbol. I also tried using the portfolio id "H195151-74" but to no avail.
I asked a question some days back and got an answer which I understand and make sense: Probability of touching short call strike and not touching touching short put strike of a short strangle? However, the answer to that question brought up another related question to my mind. With the probability of that event happeni...
Let $W_t$ be a Brownian motion under probability measure $\mathbb{P}$. Let $X_t$ be defined as follows. $$\mathrm{d}X_t = a \mathrm{d}t + 2\sqrt{ X_t} \mathrm{d}W_t.$$ Also define: $$L_t = \exp\left(-\frac{k}{2}\int_0^t \sqrt{X_s}\mathrm{d}W_s-\frac{k^2}{8}\int_0^t X_s\mathrm{d}W_s\right).$$ If $L_t=\frac{\mathrm{d}\ma...
I have monthly returns of about 977 securities of past 10 years. If I keep the returns as it is i.e. I do not multiply by 100 and keep the returns as 0.1, 0.2 , -0.3, 1.2 then I get different results in the securities shortlisted if I have used returns that are multiplied by 100 i.e. 10, 20, -30, 120 If I used 100x mul...
I am currently trying to Block-Bootstrap my Stock-return data in Python. I am doing that to generate synthetic data. I came across the CircularBlockBootstrap but found in a few discussions here that it isn't recommended for such data. Now I am trying to find a simple BlockBootstrap Library in Python unfortunately I can...
I'm doing some database design where I'm modelling Forwards and Spots. They share the same schema, the only difference is that Spots have a settlement date of the time they were created at, while Forwards have a settlement date some time in the future. I know it seems banal, but they're really similar in structure, and...
I recently read, that yield changes during a short time window can be approximated by dividing the returns of futures on the bond by its Duration. Has anybody heard this before and can shed some light on why this works?
Suppose that $Z(t)=e^{-\int_0^t \theta'(s)dW(s)-\frac{1}{2}\int_0^t ||\theta(s)||^2ds}$ with $\theta()=\sigma^{-1}()[b()-r()]$, $\sigma()>0$ and invertable and $W()$ a Wiener process There is also a process $V^{w,h}$ for describing the wealth of an investor such that $\frac{V^{w,h}(t)}{B(t)}=w+\int_0^t\frac{h'(s)}{B(s)...
Assume we have an FX portfolio with $n$ currency pairs, such that $w_i$ is the weight of currency pair $i \in \{1, \dots, n\}$ in the portfolio, and $\sum_{i=1}^n w_i = 1$. All pairs have USD as one of the legs (USD is the base currency of the portfolio, and I would like to allocate to other currencies using Markowitz)...
I’m trying to bootstrap a 1m, 3m and 6m euribor curve. The data I’m using is 3m Euribor swaps, 1m/3m basis spreads and 3m/6m basis spreads. I’ve successfully used quantlib to bootstrap a 3m curve but I’m struggling to work out how to build the 1m and 6m curves with the data I have. Is it as simple as adding/subtracting...
I want to reproduce the results of Bianchi et al (2017) Escaping the Great Recession using R and/or Python. Authors in the article used Markov Switching Vector Autoregressive (MSVAR) and Markov Switching Dynamic Stochastic General Equilibrium (MSDSGE) models. I found MSBVAR R package (archived) which can fit MSVAR mode...
For mean-variance portfolio optimization with short-selling allowed, but restricted to a certain percentage of the portfolio weights (lets assume N), we can constrain it in the follwoing way: (from j=1 to n) sum[max(-wj,0)] <= N the problem is that it is not linear and so if we add it to our mean-variance problem formu...
In this famous paper, Bailey and De Prado discard Cross Validation as tool to check for Backtest overfitting, on the ground that it is just an holdout method: ... If we apply the holdout method enough times (say 20 times for a 95% confidence level), false positives are no longer unlikely: They are expected. The more t...
From this dicussion, the commentor said Lastly, firm fixed effects may absorb more variation and likely reduced the size of their standard errors. In practice, I also mainly see that the standard error for country-level mainly higher than that of firm-level variables. I am wondering if there is any mathematical or in...
Suppose that we have the Black and Scholes model where the interest rate and the volatility are time varying: $dB(t)=r(t)B(t)dt$ and $dS(t)=S(t)b(t)dt+S(t)\sigma(t)dW(t), S(0)=s>0$ where $r,b,\sigma$ deterministic, positive and bounded. I know that the price of european call option with strike price $K$ is given by $\t...
I am investigating the Fama and French model using a Bayesian selection procedure laid out by Barillas and Shanken (2018). When I plot the cumulative probabilities of each factor, I notice that for both HML and SMB these probabilities decrease sharply. What is a possible explanation for this effect? Is it due to the do...
For a project I need to fit a GARCH(1,1) model to the log returns of an index. When using the residuals of an ARMA or ARIMA model it is clear that the (conditional) mean is 0. When using the log returns, do I have to do centering first? I know that log returns tend to be stationary, but that is only for the uncondition...
I am interested in an integrated call option that removes the dependence on time, $$I(S)=\int_0^\infty C(S,t)\text{d}t.$$ Because the value of a call option is a smooth function, I expect this integral to be smooth too. By Fubini, the delta of $I$ is just the integrated delta of a normal call option and should be smoot...
What should be the minimal length of historical data to do "practical" portfolio analysis to achieve "sane" results? There are several questions here on what should be done when a portfolio historical data is not symmetrical (stock A has 10 years of data and stock B just one year). There are several approaches and one ...
If my understanding is correct, then owning a future essentially means owning a contract which obliges to buy/sell something at a certain time for a certain price. But what I don't understand is how, in practice, trading futures works. When I look at video's of people trading futures they buy and sell futures just like...
I'm having issues with a simple FixedRateBond bond yield calculation using QuantLib: import QuantLib as ql start = ql.Date(9,9,2020) end = ql.Date(23,7,2021) period = ql.Period(int(2)) coupon = 2.75 face = 100 ql.Settings.instance().evaluationDate = ql.Date(31,5,2021) given = 102.23 schedule = ql.Schedule(start, end,...
How to compute the BRL plain vanilla swap. I have followed the below methodology to calculate the valuation for other indexes but BRL-CDI is far off from actual valuation. Please suggest if anything I am missing in BRL swaps especially. # construct discount curve and libor curve risk_free_rate = 0.01 libor_rate = 0.02...
In index options, there was not much of a smile (on the put-side) until the 1987 market crash. I'm wondering if the same applies to single name stocks? That is, do price crashes in individual stocks trigger smiles in their option surfaces?
My book claims the following: "The other assumption of normally distributed returns would mean that returns would be between $-\sigma$ and $+\sigma$ with 68.269 per cent probability. This means that you would have an exceedence of roughly once every three days." Now, since $\ln (S_T/S_0)\sim N((\mu+\dfrac12\sigma^2)\...
I have an extensive trade log of historical buy and sell orders and I am trying to calculate the running p&l of the trading results. Most rows represent partial fills where there is still a balance of the traded asset held between time periods. This is confusing me a bit, as it seems there needs to be a rolling cost ba...
Suppose that $X$ is a random variable and $\frac{d\mathbb{Q}}{d\mathbb{P}}$ is the Radon-Nikodym derivative. The quantity under consideration is as follows: \begin{equation} Cov(X, \frac{d\mathbb{Q}}{d\mathbb{P}}) \end{equation} My question is here: Under which conditions we can say that the above quantity is positive ...
I would like to know what database would you guys use for storing around 500GB-1TB of options and time series tick data. The idea is to use it for backtesting so it would have to be as efficient as possible. I'm also interested in what service would you guys use for storing it online so it's accessible to more people.
For instance, consider momentum strategies. Naive portfolio construction will likely load on large style/industry return components, which increases portfolio risk dramatically. How do quant funds usually construct hedged factor portfolios that try to neutralize such unwanted large risks?
It's my understanding that in order to calculate the option adjusted spread on a mortgage backed-security, the following steps are required: Run a Monte Carlo simulation of interest rates Project mortgage rates along each simulation Compute cashflows and get NPV Average NPV and compute spread that solves for the numbe...
I was wondering if someone can help me understand how to interpret the "annual yield" that is getting calculated below for NDFs. This is the way it's currently done in the place I work, but not intuitively understanding the formula for it (below). Any advise would be very appreciated. For the date to the left, they pr...