instruction
stringlengths
15
26.1k
there's something I don't understand about factor investing and factor models. What I understood is that factor investing can be explained by factor models, via the factors exposures. For example Fama-French observed that Size and Book-to-Ratio were systematic risks of a portfolio and consequently they led the follo...
Why do we regress with respect to premiums in factor models like FF?
Firstly note that Fama and French argue that size and book-to-market represent systematic risk. But they don't have to. There are many behavioural explanations that argue why small stocks outperfom large stocks and why value stocks outperform growth stocks. So, let's assume size and book-to-market carry _a_ premium ...
Firstly note that Fama and French argue that size and book-to-market represent systematic risk. But they don't have to. There are many behavioural explanations that argue why small stocks outperfom large stocks and why value stocks outperform growth stocks. So, let's assume size and book-to-market carry _a_ premium ...
What are some common properties for risk aversion? I know the basic definition of the risk premium, absolute risk adversion, relative absolute risk adversion. Besides the basic definition, what are the good to know properties?
for CRRA, does increasing gamma leads to increase in risk-aversion? Looking at the curve, I think increasing gamma leads to less in risk-aversion (since the risk preimum is less). But in terms of absolute risk aversion, CRRA = $\gamma /X$. Looks like increasing $\gamma $ leads to high risk-aversion. Which is right?
I'm not sure if this question is appropriate for this SE board. If not, I can definitely remove it. FWIW, I saw a few other interview-related questions posted on here. Anyways, I will be interviewing for quantitative researcher and developer positions at hedge funds and prop trading firms this summer. My unders...
What machine learning algorithms are important for quant interviews?
Anyone got references where we can find examples of codes for agent-based simulations of financial markets?
Factor investing can be explained by factor models, via the factors exposures. For example Fama-French observed that Size and Book-to-Ratio were systematic risks of a portfolio and consequently they led the following regression $$R_i-R_f = \alpha_i + \beta_m(R_m-R_f)+\beta_s SMB + \beta_v HML + \varepsilon_i.$$ ...
What does the red phrase below mean? >[doougle. 7 points 3 years ago](https://old.reddit.com/r/options/comments/4yobnc/cutting_losses/d6pakjx/). > This is one of the "not as easy as it sounds" things about options. You always hear things like "Make money if the market goes up down or sideways" or "defined risk ...
What does buying back a "short strike" for .05 mean?
1. What does 2 below mean? 2. Adjust what once? 3. What do tested and untested side mean? >[teamspritemini. 2 points 3 years ago ](https://old.reddit.com/r/options/comments/4yobnc/cutting_losses/d6p8jh0/) > My preference is as follows: > > 1. If Naked, 3X premium as stop loss > 2. If defined risk, ...
What are an option's "tested" and "untested" sides?
I have question concered currency of the CDS spreads. In the analysis I am conducting, I perform adjustment of interest rates for country risk (CDS could be a reference to reflect a country risk). I have bond issued in USA for e.g. 5Y with interest rate WIBOR 6M + margin 500 bp (now it is expressed as WIBOR – pr...
Having a position "tested" or "stressed" is trader jargon for "an assumption I made when entering the position is turning out wrong and I am losing money" or "the trade is going the wrong way at the moment". For example: you sell an OTM option with strike K, as the underlying S approaches (and goes beyond) K that op...
Having a position "tested" or "stressed" is trader jargon for "an assumption I made when entering the position is turning out wrong and I am losing money" or "the trade is going the wrong way at the moment". For example: you sell an OTM option with strike K, as the underlying S approaches (and goes beyond) K that op...
Having a position "tested" or "stressed" is trader jargon for "an assumption I made when entering the position is turning out wrong and I am losing money" or "the trade is going the wrong way at the moment". For example: you sell an OTM option with strike K, as the underlying S approaches (and goes beyond) K that op...
Respected sir, i have run Fama MacBeth cross section regression of of Excess Return of stocks on Idiosyncratic volatility, Ln(market capitalization), book to equity ratio and Beta. i am getting all significant results. my idiosyncratic volatility is positive which is correct but i am not getting the desired sign of ln...
I have run Fama MacBeth cross section regression of of Excess Return of stocks on Idiosyncratic volatility, the log of market capitalization, book to equity ratio and Beta. I'm getting all significant results. My idiosyncratic volatility is positive which is correct but i am not getting the desired sign of log market c...
We can calculate the stock price by the equation: $\frac{dS_t}{dt} = \mu dt + \sigma dB_t$,where $B_t$ is a Brownian motion. First i create a portfolio that consists of $\Phi$ units of stock share and $\phi$ units of cash. Denote the amount of share and cash at time t as $\Phi_t$,$\phi_t$.Then, the value of the por...
Black Scholes model without using Girsanov's theorem? It might happen?
Suppose we observe the following term structure (of annualised spot rates): - 0-3 Months $\rightarrow$ 4.0%. - 0-6 Months $\rightarrow$ 4.2%. - 0-9 Months $\rightarrow$ 4.4%. Question1) How can we infer (compute) the rates for the period 0-2M and 0-4M. Is there any standard way (interpolation) to do that in ...
Maybe it is a naive question, I simply can't understand how the industry is using the BS model to price options, as the option pricing formula requires implied volatility as an input, which itself is derived from the option market prices. I just don't get how it all ties together given that one of the inputs is depend...
I'm trying to price a non-standard swap. However, my schedule is not returning the correct dates. In particular, the effective date starts on a Saturday but the schedule returns the next biz date which is a Monday. I need to accrual to start on the effective date without adjustment. How can I tell the schedule object t...
How to make the effective date to start on a holiday/weekend in py QuantLib?
There are numerous papers that describe the derivation of the Local-Vol equation using available market prices of options. For example: - Dupire's formula (see e.g. [OpenGamma (2013)][3]) gives us LV in terms of absolute strike & price:<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [![enter image description here...
I'd like a library to calculate the options local volatility surface, i.e. the options implied volatility surface for a collection of strikes and their bid/ask prices. Here are the libraries I've looked at: * [QuantLib][1] (Quote: "from memory, the function qlBlackVol will interpolate vols making sure that the s...
I am looking for - a **list** of day count conventions. Is the [list on Wikipedia][1] complete or do you know others? - Which **rules of thumb** are there to choose day count conventions when none is specified, depending for example on product, country or underlying? - Are there **special cases** which can provoke...
I am reading a paper by Richard White, Opengamma named Numerical Solutions to PDEs with Financial Applications. There is an implementation codes as stated in paper hosted at https://opengamma.com/downloads/financial-pde-solving-matlab-examples.zip Unfortunately the link is broken. Could you please share it with me i...
Is Touching the same thing as At The Money?
I don't understand this example of [Pin risk (options) - Wikipedia](https://en.wikipedia.org/wiki/Pin_risk_(options)#Management_of_pin_risk). 1. When the call buyer exercised, wouldn't $\color{limegreen}{\text{exercise}}$ have automatically and instantly bought him 1000 shares @ $90? 2. How does the call buyer ...
After you exercise a call option to buy at $90, how can you have another 30 seconds to buy at $89.95?
After you exercise a call option to buy at $90, how can you have another 30 seconds to buy at \$89.95?
[[A]s implied volatility increases, option premiums become more expensive. As implied volatility decreases, options become less expensive. ](https://www.investopedia.com/articles/optioninvestor/08/implied-volatility.asp) [Buying options when IV is 55 and selling when it is 30 is a sure way to lose money](https://www.th...
Why do Vertical Credit Spreads benefit from higher IV?
John Hull. [*Options, Futures, and Other Derivatives* (2017 10 edn)](https://www.amazon.com/Options-Futures-Other-Derivatives-10th/dp/013447208X). p 408. >Theta is usually negative for an option.<sup>7</sup> This is because, as time passes with all else remaining the same, the option tends to become less valuable. ...
How does Theta benefit sellers of debit spreads?
I am trying to learn Black-Scholes risk-neutral densities with only prior knowledge of fundamental B-S equations (not the derivation). Sorry if this was asked already or if I sound completely clueless. Basically I do not understand what lowercase ***x*** stands for in the integral formula below. It is then subsequen...
Can you explain the Black-Scholes fair option equation with RND?
Consider the following PDE on $[0,T]\times \mathbb{R}$: $$ \begin{cases} \dfrac{\partial F}{\partial t}+\mu(t,x) \dfrac{\partial F}{\partial x}+ \frac12 \sigma^2(t,x)\dfrac{\partial^2 F}{\partial x^2} = 0 \\ F(T,x)=g(x) \end{cases} $$ with $\mu(t,x)=-\frac{1}{1-t}, \ \sigma(t,x)=1, \ g(x)=x^2$. Question: Wha...
Try NSE:[Stock Symbol] in the URL Example: - NSE:TITAN - NSE:TATASTEEL Also replace demo apikey with your APIKey ``` https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=**NSE:TITAN**&interval=5min&apikey=**your apikey**&datatype=csv ```
[[A]s implied volatility increases, option premiums become more expensive. As implied volatility decreases, options become less expensive. ](https://www.investopedia.com/articles/optioninvestor/08/implied-volatility.asp) [Buying options when IV is 55 and selling when it is 30 is a sure way to lose money](https://www...
I'm pricing a vanilla swap. I have two stubs, front and back, and they can be short, long or a combination. In this case, what do I use in `ql.Schedule` object for `Rule` parameter? I use `ql.DateGeneration.Forward`, but I wasn't sure for two stubs. In the [QuantLib for python][1] under Schedule Class, I didn't see for...
Which object in DateGeneration object when there are two short, long or combination in Schedule object for py QuantLib?
I am well aware of how the ordinary Black and Scholes equation is derived, under the assumption of an arbitrage free portfolio, $V=G-hS$. Here $S$ is the price of the underlying and $G$ is the option price. Suppose now that the portfolio is stochastic, and follows the process $$(1): dV=rVdt+f(V,t)VdW,$$ where $r$ is ...
Take for example the S&P500 universe with 500 stocks. Something interesting would be to create clusters based on stocks' correlations in order to have clusters that have the same "direction" in the market. That's easily done by a clustering algorithm, with a well-defined distance matrix from the correlation matrix. ...
Please see the red phrase below. [Guide to Option Pinning at Options Expiration | Investing With Options](https://investingwithoptions.com/blog/2011/11/18/option-pinning-option-expiration-guide/) > **What Have Weekly Options Done To Pinning?** > > That's a great question for a graduate student to cover in a thesi...
What does 'near term order flow to be distributed across short term options' mean?
As other answers say you normally don't. You avoid trading it normally a couple of days before expire and you tend to find liquidity dries up on the day of expiring. Volume-based roll is a common way to know when to roll. ARMIA assumes some regression to the mean and normally isn't used to predict volume. L...
For a given maturity, given three equally spaced option strikes $K_1,K_2,K_3$ a "butterfly" combination consists of shorting 2 of the middle strike calls and buying one each of the "wing" or lateral calls. This position has a positive cost i.e. $c_1+c_3-2 c_2 >=0$ (why? because it has a positive payoff for $S_T\approx ...
For a given maturity, given three equally spaced option strikes $K_1,K_2,K_3$ a "butterfly" combination consists of shorting 2 of the middle strike calls and buying one each of the "wing" or lateral calls. This position has a positive cost i.e. $c_1+c_3-2 c_2 >=0$ (why? because it has a positive payoff for $S_T\approx ...
I got to bootstrap the OIS and Libor 3M swap curves, and now I'd like to valuate some simple Libor3M - Fix IRS with QuantLib (in python). My problem is that some of the instruments I have to valuate have custom amortization structure. Are there any examples on how to valuate a swap with a custom amortization schedule?
For a given maturity, given three equally spaced option strikes $K_1,K_2,K_3$ a "butterfly" combination consists of shorting 2 of the middle strike calls and buying one each of the "wing" or lateral calls. This position has a positive cost i.e. $c_1+c_3-2 c_2 >=0$ (why? because it has a positive payoff for $S_T\approx ...
When doing a regression based performance attribution I see that people normally use WLS. So that both our independent and dependent variables are multiplied by our WLS matrix, which is a diagonal matrix that where the values on the diagonal are the square root of the companies market cap. >X = X .* WLS >y = y...
When doing a regression based performance attribution I see that people normally use WLS. So that both our independent and dependent variables are multiplied by our WLS matrix, which is a diagonal matrix that where the values on the diagonal are the square root of the companies market cap. >X = X .* WLS >y = y...
I'm looking for some papers to support some options lessons for non-quant people (mostly traders) and I'd like to know what papers would you recomend that don't have a very strong focus on the mathematical side of it. Also would definitely be interesting to know what other papers you find interesting regarding this ...
What are your favourite papers about European/American options?
"The investment banks supplying structured products were effectively buying options from investors" How to understand this? I would think the investors are usually had (long) the call option on equity index in many structured products, so the bank should be short option instead of buying options from investors?
It depends on your (assumed) underlying data generation process. In general, Weighted Least Squares (WLS) can be used when your data is heteroscedastic but still uncorrelated. Assume a linear model $$Y_i = \beta_0 + \beta_1 X_i + \epsilon_i \tag{1}$$ If you assume $var(\epsilon_i) = \sigma^2$, i.e. the erro...
"The investment banks supplying structured products were effectively buying options from investors" How to understand this quote from this [source][1]? I would think the investors are usually had (long) the call option on equity index in many structured products, so the bank should be short option instead of buyin...
It depends on your (assumed) underlying data generation process. In general, Weighted Least Squares (WLS) can be used when your data is heteroscedastic but still uncorrelated. Assume a linear model $$Y_i = \beta_0 + \beta_1 X_i + \epsilon_i \tag{1}$$ If you assume $var(\epsilon_i) = \sigma^2$, i.e. the erro...
Here is something I did, maybe it helps: https://colab.research.google.com/drive/1M1YJncdswd-A9SgIOAjw6g6Se7NHU9mG?usp=sharing
**Preamble** It is in general true that structured products can be decomposed in simpler products (linear and options for example). Regardless of the decomposition of the specific product, it is typical for the bank to "buy" some rights from the customer. This is the way to grant a higher (expected) yield in structu...
How can I build a good vol surface using QuantlibXl? My goal is to price a swaption 5 year with option maturity 1Y1M. The data are: [![vol ATM swaptions][1]][1] [![enter image description here][2]][2] [1]: https://i.stack.imgur.com/94BjR.png [2]: https://i.stack.imgur.com/k0qxJ.png
What is the industry practice in calibrating SABR Libor Market Model? Do you first calibrate the SABR model using market data and then implement the libor market model with the calibrated parameters? I am reading a paper from Hagan and Lesniewski "*LIBOR market model with SABR style stochastic volatility*" and the p...
For US public companies we can go on [sec.gov](https://www.sec.gov/) to find their 10-K filings etc. Are there similar services in other countries? I'd be especially interested for in Europe, France, Germany, Italy, Switzerland etc. Companies normally have an *investor relations* website where they publish their ...
Is there an equivalent to SEC EDGAR for non-US companies, especially Europe?
Yahoo Finance For example * BASF (listed in Germany): https://finance.yahoo.com/quote/BAS.DE/history?period1=796867200&period2=1589932800&interval=div%7Csplit&filter=div&frequency=1d * Roche (listed in Switzerland): https://finance.yahoo.com/quote/ROG.SW/history?period1=796867200&period2=1589932800&interval=d...
Given the assumptions listed as 1,2 and 3 here https://www.investopedia.com/terms/t/technicalanalysis.asp What do you think about the idea that old technical patterns/trends should definitely not work any longer given that CB has taken an increasing place in the market? The basic assumptions are that the market ...
Changes of patterns in technical analysis?
Given the assumptions listed as 1,2 and 3 here https://www.investopedia.com/terms/t/technicalanalysis.asp What do you think about the idea that old technical patterns/trends should definitely not work any longer given that central banks has taken an increasing place in the market? The basic assumptions are that ...
In the case of the classic Geometric Brownian motion $$dS_t = \mu S_t dt + \sigma S_tdW_t$$ we solve it as $$ S_t = S_0 \exp\left[ \left(\mu - \frac{\sigma^2}{2}\right)t + \sigma dW_t\right] $$ and simulate $S_{t_{i+1}} = S(t_i) \exp\left[ \left(\mu - \frac{\sigma^2}{2}\right)(t_{i+1}-t_{i}) + \sigma dW_t\right]$...
What market conditions are attributable to prolonged instances of triangular arbitrage opportunities?
I am investigating the potential for intra-exchange triangular arbitrage opportunities for the Cryptocurrency market. I believe that due its immaturity, relatively low volume and high volatility that such instances materialise and persist for periods of time long enough to be taken advantage of through an exchange API....
1. Lets say I for work with data from 2000-now in one sample (in-sample), and lets say that my out-of -sample will be from 2000 to 1950. I will then get some type of out-of-sample result. 2. If i then run a regression with in-sample data being from 1950, and up til 2000 (meaning that my-out of-sample will be from 20...
we form a stock index by using only two stocks in the index. One of the stocks is the Stock-A. The current selling price of the stock-A is 103 dollars and the second stock is the stock-B. The current selling price of the stock-B is 56 dollars. The current value of the index is equal to 267 dollars. Stock-A pay...
No, you should not expect to get the same results. It would be a spooky coincidence if they actually coincided. Sufficiently spooky as to warrant an audit if they did! Rather the question you can ask is the likelihood the distributions of the two sub-samples are drawn from the same or a different population. Pooling...
So I'm reading through Dynamic Hedging to start trying to learn option theory better. I hit Chapter 8 on Delta and am completely lost on a certain example he gives. The example is from Page 119 and is labeled "A Misleading Delta" - He posits the following scenario - A trader has the following position, yield cur...
Answering my own question - it appears that I can't read formulas correctly. The final $$ \left( 1 - \dfrac{ln(S/L)}{Z} \right) $$ term at the bottom of page 181 of Haug is only added once at the end of the iteration, not on each loop. Hui's original work also brackets similarly. I assumed the square brackets inclu...
As a beginner, it can sometimes be hard to discern what different terms and phrases mean in QF. I've heard multiple people such as academics and market-makers say things like "*calibrate vols*" or "*calibrate to the market*" but I'm not exactly sure what this means. Focusing mainly on Vanilla American and European O...
Mid price is so noisy so I try to use the weighted price, which is much better. However I want to define a better price called weighted price **My questions are:** 1. How can I get a good weighted price 2. How to judge the weighted-price. How can I define an indicator to judge whether the weighted price is...
Mid price is so noisy so I try to use the weighted price, which is much better. However I want to define a better price called micro-price. I use different level of quote and give the different parameter to the multi-level price, however I can't get a better price than the weighted price. **My questions are:** ...
I'm trying to implement a code to build limit order books. While doing some research I have seen two methods mainly, order-based for equities and level-based for futures. I could not understand why there are two methods. Why doesn't level-based methods fit for equities? or vice versa... Thanks
what is the delta of a payer and a receiver swaption? Is it negative for receiver swaption and positive delta for payer swaption a?
I am trying to solve the perpetual American option problem. Currently I'm following [this][1] (slide 9). The stock price is modelled as Ito's process. > $dS_t = (r-D_0)S_tdt\ +\ \sigma S_tdW_t $ where $D_0$ is the dividend, which can be ignored too. Basically the problem tries to find optimal stopping time to exe...
I'm currently setting up an "Investment Framework" that should allow the following steps: 1. Investment Committee (IC) has to decide on probabilities for 4 different market states. I have historical data for each of the distinct market states. This historical data will be probability weighted as input in step 2. ...
I'm trying to implement a few simple VIX strategies (1/0/-1-signals based on MA crossover, term structure, hvol vs ivol) in Python. I am new to quant and volatility, but looking at the VIX properties suggets that a short signal bias (-1) should be successful (I multiply the signals with the log returns of daily closing...
I am studying trinomial trees and trying to implement them in Python to compare them to the monte carlo simulation. I searched 3-4 hours in the web; but can't find any implementation on binomial or trinomial trees online. Very simple question by a beginner: is there any place to get more information on the implement...
On July 2, 1997, a a company is worry about the value of its Yen income over the next few weeks and makes a decision to hedge its risk by taking a position in the futures market. Right now, a futures contract written on the Yen with a maturity of November 1, 1997 has a price of $7.8741/Yen. This contract’s size is 500...
Should he choose long position or short position?
Which could be a recent equivalent of Fama's book Foundations of Finance? By "equivalent" I mean a book which is rigorous, but without being a book on stochastic calculus; which is focused on stock returns and their behaviours, but not a mere econometrics book; which is empirically grounded, but it is not a coll...
If a Futures contract has two separate dates $T_d$ (when deliveries may begin) and $T_f$ (which is the last date by which delivery must take place) then you cannot use the formula found in introductory books such as Hull: $$F=S e^{rT}$$ For example for Bond Futures $T_d$ is about one month before $T_f$. In that c...
Consider the following problem: - You would like to understand how a particular Multi Asset Class fund is invested (ascertain the weights attributed to each asset class) - You have at your disposal a series of daily returns for that fund - You also have daily returns for broad asset classes (Gov Bond index, lo...
Existing research on fund performance contribution analysis?
In an automated strategy, is one restricted to buying round lots of 100 shares ? If so, 100 shares of google would be on the order of 100K. Is it possible to tell the broker that you don't want to buy round lots of certain stocks. Thanks.
I've been wandering if would be possible to value a TRS I have in an unusual way. I would like use the accrual method for the asset leg, since the the asset leg is a long position in an equity and it reset periodically (every 3 months) but price the financing leg using the projected method since this leg has a multi-y...
I am trying to solve the perpetual American option problem. Currently I'm following [this][1] (slide 9). The stock price is modelled as Ito's process. > $dS_t = (r-D_0)S_tdt\ +\ \sigma S_tdW_t $ where $D_0$ is the dividend. Basically the problem tries to find optimal stopping time to exercise the option i.e. we t...
I am trying to solve the perpetual American option problem. Currently I'm following [this][1] (slide 9). The stock price is modelled as Ito's process. > $dS_t = (\mu-D_0)S_tdt\ +\ \sigma S_tdW_t $ where $D_0$ is the dividend. Basically the problem tries to find optimal stopping time to exercise the option i.e. we...
Does anyone know where I can find and purchase Chinese historical tick data? Seems like so hard to find out there.