instruction
stringlengths
35
27.7k
On 10.10.2012, I have looked at the bond-rates and, both for Switzerland and Denmark, there is a discontinuity/spike at 1Y, as per below Switzerland: ON= -0.09, 1W= -0.180, 1M= -0.230, 3M= -0.2, 6M= -0.01, 1Y= +0.250, 2Y= -0.124, 4Y= -0.077, 5Y= 0.060, etc (normal curve) Denmark: 1M= -0.350, 2M= -0.300, 3M= -0.150, 6...
I read an interview today with Stephane Coquillaud. He talked about this idea of formulating a data set of the G5 currencies as a pentahedron. The obvious benefit is the fact that there is more information contained in the data and you'll no longer be testing on marginal price movements of single pairs but rather on t...
Let there be $n$ stock symbols. Let each stock symbol have exactly $t$ ticks (with all ticks miraculously aligned.) We are now searching for potential pairs for pair trading. A brute-force solution involves looking at all $\frac{n(n-1)}{2}$ pairs and for each pair, doing an $O(t)$ operation. Can we get an approximate s...
I apologize if this is supposed to be obvious, but ... . Libor spot rates are quoted up to a year, beyond that one can use Eurodollar futures to continue to build the curve. Let's say up to 3 years. Beyond that one can ... well that is what I don't know. Google says "benchmark swaps", but that is the "chicken or egg" p...
I'm looking for an online resource to study the usual performance statistics (CAGR, MaxDD, Payoff Ratio, Win/Loss Ratio, etc.) of trading systems, preferably trend-following systems. I know that Collective2 is a great resource for trading systems and their performance statistics...but are there also any other useful w...
In high frequency and low latency trading, decisions are done on the spot by servers colocated in stock exchanges. This implies that those servers have immediate access to the information they need to take decisions right at the stock exchange. What data feeds do these servers have access to on-site? Is it all provided...
Let's say we have a trading system that trades daily, holding for one day, but uses an indicator that looks back over the last 5 years. A simple example could be the percent change in price of an asset over that 5-year period. There will be a high degree of serial correlation in the indicator values from one day to the...
I am working in the area of building credit risk models. Upto this point, the model I have been focused on using the Asymptotic Single Factor Model, more popularly known as Vasicek Single Factor Model. The single factor being representative of the state of the economy. Now I want to evaluate a more elaborate multiple f...
The requirement I am given is to implement a web ppplication which utilizes Interactive Brokers's API to fetch data. I went through the IB API web page and came across two viable methods: TWS and IB Gateway. But both method require proprietary executables to be running. This doesn't make sense from a web perspective as...
My portfolio comprises of 3 assets A,B,C that are correlated and the variance-covariance structure is known. At any given point in time, my position in Asset A say is given to me. I need to construct a variance minimizing hedge using both B and C, given this position in A. Basically I am approaching the problem by dir...
A simple and lazy approach to implementing an order and position management (OPM) component in a (semi-)automated trading system: leave most OPM to counter party (broker/exchange). Even then funds and positions need to be checked once orders are supposed to be dispatched. Else it is unkown whether one has funds or alr...
I am trying to price an option using the Monte Carlo method, and I have the price process simulations as an inputs. The underlying is a forward contract, so at all times the mean of the simulations is current forward price (also the starting point of the simulations). There is no drift. However, these simulations are ...
How do you construct something that lets you buy "vol of vol"? not necessarily for VIX, but any particular stock or index.
This should be a basic question but I have not been able to find a satisfying explanation. In the simplest binomial model, the risk neutral probability is computed using the up/down magnitude and the risk-free rate. But why is the risk neutral probability simply "assumed" to be 0.5 in the context of short rate models?
What open source or commercial .NET statistical package would you guys recommend? I am doing statistical arbitrage in options. The functions I need mainly are regressions, optimizations..etc. It would be better if the package has some built-in functions specifically for options, but it's fine if it doesn't. Quality, sp...
For a Long/Short Strategy, I have two stocks with different volatilities. How can I calculate the right position size for each leg? *The pair trading is not coming from co-integration but more as a hedge (protection)
I'm going to write the MSc thesis on flight-to-liquidity phenomenon in stock markets and I'm interested in liquidity measures other than Amihud or bid-ask spread. What are some other popular measures of liquidity?
Can the Hurst exponent be greater than one? Does it mean that the time series follows a random walk or that it's not stationary?
Is there a data feed provider that has a REST (http) API? Preferably real-time and historical, at least for US equities.
Do you guys know if a paper has been published that discusses forward- and backward adjusted stockprices, and the look ahead bias coming from backward adjusted data?
I am preparing an undergraduate lecture in quantitative finance and I am looking for material that combines the topics: random walk and heat equation The material should be accessible (intuitive!), give some background (so not only proving that the random walk is the solution to the heat equation) and could also addr...
I am trying to create a simple risk calculation for the portfolio (ignoring correlations for the moment). I have some corporate bonds with limited daily price changes. Any one have ideas how I can get a VaR (95%) for these assets given their limited pricing history? Is there any easy way to use CDS for the name instead...
I recall reading a paper, but can't remember where I found it. In short, there was a parametric form for volatility smile/skew that fit both index and single stock vol slices and had intuitive parameters that were consistent in time. It was something like ATM vol + skew + convexity + 2 or 3 parameters to take care of t...
This paper mentions the elliptic Heston operator: $Av:= -\frac y2(v_{xx}+2\rho\sigma v_{xy} + \sigma^2v_{yy}) - (c_0 - q - \frac y2)v_x + \kappa(\theta -y)v_y + c_0v$. Then boundary value problem are discussed: $Au=f \text{ on } \Omega \\ u = g \text{ on } \partial\Omega$ I would like to know how people use such Diri...
How would one price a derivative denominated in EUR that pays in USD?
I'm curious about how to construct the five basic greeks for an equity option portfolio when there are shares of the underlying in the portfolio. For example, a portfolio of 100 call options and 100 put options has a portfolio delta of 100 * call_delta + 100 * put_delta (assuming the 100 calls are the same and 100 puts...
Let's assume I am classifying every trading day as a 1 or a 0. Exactly what I am classifying doesn't matter, but for the sake of this question let's say I am predicting direction of price change. So, for a particular stock like GOOG: For day N: 1: close day N+1 > close day N 0: close day N+1 <= close day N For every ...
I'm starting on a project that involves correlating and forecasting Forex time series to news releases. I'm aware of sources such as Thomson Reuter's machine readable news and Dow Jone's Newswire services. However, they both require expensive subscriptions. Does anyone know of any similar but free equivalent that I can...
Could anyone please help me with the following? I need to generate a histogram (resp. probability density) of returns of a bonus-certificate. A bonus-certificate can be replicated by an underlying and a down-and-out-put option. I tried to do that with Matlab but not by calculating the right PDE using conditional probab...
I would like to make a comparison between some multi asset class strategies and some kind of benchmark. In this situation, the classic benchmarks like MSCI World (for Equitites), GSCI (for commodities) or Barcap (for Fixed Income) are not an option anymore; I would like to find any global multi asset class index. So I ...
I'm looking for a set of exercises that teach how to build a project finance spreadsheet. I accept there may be no typical project finance, but there are a lot of principles are shared in common across a lot of projects. The debt/ equity split, setting hurdle rates, calculating IRR, looking at how yields vary depending...
I have a trading strategy that generates returns $R_{t}$. I want to test the strategy by looking at the alpha: $R_t - R_{f,t} = \alpha + \beta (R_{m,t} - R_{f,t}) + e_t$ I compare my alpha against the strategy of just doing an equally weighted portfolio over my assets universe. I also use an analogous method for factor...
I may have every particular detail of this wrong, including the exchange, but years ago, maybe as long as 20, there was a successful suit against NASDAQ based on research by academics showing their bid-ask spreads were too wide. Does anyone recall the suit, the academics who were involved, and maybe where the research ...
I want to create a position that either multiplies with $1+u$ (outcome $U$) or $1-d$ (outcome $D$). The probability of $U$ is denoted by $P(U) = \pi$. The initial value of the position is $V_0$. Given outcome $U$ the value of the position is $V_U = (1+u)V_0$, and given outcome $D$ it is $V_D = (1-d)V_0$. More specifica...
I have estimated sGARCH, EGARCH and TGARCH, which some for particular models are significant. For others, the alpha remain insignificant using various innovations such as the skewed variants of the normal or student $t$ distributions. I am tempted to rely on the models that give significant estimates and then ignore th...
I am reading a paper (reference below) that states "The conditional volatility for each underlying security (or for a market index) can be estimated using the standard deviation of the stock’s periodic returns. However, since volatilities are persistent, as we have learned from the ARCH literature, such an estimator of...
For other algorithms (like support vector machines), it is recommended that input attributes are scaled in some way (for example put everything on a [0,1] scale). I have googled extensively and can't find any information on whether this needs to be done for boosting methods, and in particular gradient tree boosting.
I've recently stumbled on something that really surprised me. These papers (1, 2) find that past standard deviation of returns is inversely related to future returns. That is, portfolio of low historical variance constituents (stocks) $\to$ better returns. My question: Are there any studies that contradict these findi...
I am obtaining bid/ask price and volume market data from two different sources for the same ticker and for the same day and checking to see that at time intervals X they are "roughly the same". The timestamps from the two different sources are not exactly the same, though, and so what I am doing is dumping the price ev...
I am designing a backtesting system to test an algorithm. I'd like to have a benchmark / control test results to compare to the results of a custom algorithm. A limited "set" of stocks is selected to invest in. The algorithm can choose to buy one or more stocks. In an effort to have a benchmark to measure against, the...
Since modeling leaves complete freedom we can assume both market and credit risks can enter the picture. However the minimum requirement is (migrations and) defaults simulation, how does this configure as "pure" market risk (especially in the latter IDRC case), as various people claim? Why would CVA be more credit-rel...
Coin Toss Runs Calculator The expected number of runs for two consecutive heads or tails is 3. Is there an edge if we place a progressive constant size bet(limited to 3 times)for consecutive appearance of H or T only after pattern HTH or THT appears, Or is prob=0.5 always? Say Dow is on a daily bar chart 'uptrend', i.e...
I am new to the topic of Asian options. Assume I want to price an Asian put (fixed strike, discrete average) in the Black Scholes world. I know implementations to calculate the value but what is the best way to find the implied volatility parameter? Is there a usual way to derive it from the option market of plain vani...
Does anyone know of any model to estimate the distribution of drawdown length and depth assuming a certain portfolio dynamics? The arcsine law seems to suggest that a portfolio can spend a large portion of time under water if it follows a Brownian motion. I am wondering whether there are research papers that generalize...
There's quite a bit of research (example, [1]) teasing out the fact that home/casual/individual investors prefer stocks with large positive skewness. It surprised me, as I was reading a bunch of these papers, that no point is made about whether casual investors like to hold stocks with high visibility characteristics (...
What I'm working with: I have a collection of prices that has very few to no repeating values (depending on the look back period) ie each price value is unique, some prices are clustered and some can be spread apart by great distances. Because there is only one count for each price, each price therefore has an equal pr...
Is there software (or Python / R / ... scripts) to generate (pseudo) tick data from candlestick data. I have candlestick data (CSV format) from monthly timeframe (MN) to minute timeframe (M1) but time range can be different. Filenames are : SYMBOL1.csv for M1 timeframe (1 minute) SYMBOL5.csv for M5 timeframe (5 minute...
What is the role of quants in trade execution in high frequency trading? AFAIR in "normal" trading trade execution is considered a very mundane task. What role can quantitative modelling play in trade execution in HFT?
Suppose I downloaded the closing price of a company, say Google or whatever, I want to use GARCH model to model and forecast the volatility of the return. To simplify, I only have two questions. As we know, GARCH is used to predict volatility. But, after we get the new return(or price) data, how well is the GARCH pre...
European call options with strikes 90, 100 and 110 on the same underlying asset and with the same maturity are trading for 22.50, 18.84 and 13.97 respectively. show that the convexity of the call price as a function of the strike is violated, hence leading to an arbitrage opportunity. Describe in detail a trading strat...
When you strip your rate curves using CSA, what kind of convexity effects might appear as a result when computing the CSAed curve from one fixing to another ? For example if you are valuing an USD trade collateralised in EUR LIBOR 3M, is there an effect caused by the correlation between the FX rates you use to convert ...
$\hat{\epsilon}'\hat{\epsilon}$ from the market model: $R_{it} - \hat{\alpha} - \hat{\beta}R_{mt} = \hat{\epsilon}$, or from a factor model such as the Fama-French 3 factor model, is often used in the literature to capture the idiosyncratic risk of stock $i$. What risk is this measuring? Who cares if the disturbances a...
Can someone explain to me why the delta-hedging of ATM options near expiry is difficult?
Are there any methods of prediction (machine learning, regression, etc.) which are designed to maximize the rank correlation (spearman correlation, kendall's tau, etc.) of your prediction with your independent variable? I am trying to predict a continuous numerical variable with a given set of inputs, and I am more con...
I am trying to calculate the Hurst Exponent using Excel. I am facing a problem where the exponent value sometime goes beyond 1. Can someone share a link / material so that it will help me to calculate accurate values using Excel.
Is there a version of Girsanov theorem when the volatility is changing? For example Girsanov theorem states that Radon Nikodym (RN) derivative for a stochastic equation is used to transform the expectation where the sampling is done in one mesaure to an expectation where sampling is done in another measure. Let's see...
Something that's bugged me since I've ever learned anything about finance: Philosophically(?) speaking, why does growth subtract from a perpetuity's return? I know the mathematical explanation, but it's so counter-intuitive. Why should a perpetuity with 0% expected growth be valued at the same proportion as one with hi...
I want to group Mutual Funds by their volatility. Ideally, I would like to end up with the mutual funds beings attached to different groups: High volatility Medium volatility Low Volatility My questions is : What numbers could be consider like low , medium , high volatility ? Maybe some intervals: 0 -5 % is low 5 - 1...
Does anyone have an explanation for the currently naturally forming volatility smile (and the variations) in the market?
I am trying to solve the Portfolio Optimization Problem using a "Multi-objective Evolutionary Algorithm". After obtaining the efficient frontier, I would like to know if we can infer for each point of the efficient frontier the corresponding risk tolerance parameter (which is related to the investor's preference). Than...
I have few questions about using OAS as a measure of risk: does OAS allow for comparison between bonds with and without embedded options (e.g. a callable bond against a plain vanilla one against a floating rate one)? Is the OAS of plain vanilla bond equal to its Z-Spread? If 'yes', building an OAS curve to compare all...
Cointegration trading question What's the state of the art when it comes to choosing proper subsets of stocks/assets where cointegrating relationships aren't ignored as (likely to be) spurious? For example, we wouldn't want to trade a Chinese stock of a fast food franchise with an Australian mining company because a c...
I'm hoping that someone can lend a hand. I have been reading various papers on how to combine multiple forecast time series. The main paper is Granger and Bates 1969. The suggestion here is that there is a closed form solution for combining independent forecast time series (eg returns on FTSE). I'm hoping someone can s...
I have rather a challenging question. I'm hoping that someone can share their experience. I will build up the problem in steps. Let's start our thinking with the idea of a buy and hold strategy of an stock whose returns are expected to be 10% (annualised) in excess of the market and a standard deviation of 20% (annua...
The root mean squared error (RMSE) is considered by some to be the best measure of how good a variance estimate is. You often see it quoted as: $RMSE=\sqrt{\frac{1}{n}\sum_{i=1}^n(\hat{\sigma_i} - \sigma_i)^2}$ Where $\hat{\sigma}$ is the estimate of the volatility while $\sigma$ is the actual volatility. My questio...
I am trying to price a 30 yr bond maturing in December 15, 2035. The bond is rated A- (S&P). Where can I find the spreads for corporate bonds rated A- maturing in 23 years (December 2035)? I have access to Bloomberg, but so far all I was able to find was individual bond yields. Is the 23 yr corporate spread availa...
Let $\gamma$ be the expected return, in terms of its exponential growth rate, of the market asset. If we set $\gamma=\mu-\sigma^2/2$ as explained by the Doléans-Dade exponential, then the expected return of a balanced portfolio with fraction $\beta$ invested in the market asset, and the remainder lent or borrowed at r...
Me and a friend is trying to settle and argument in relation to the following quote by Nassim Nicholas Taleb: I don’t want to spend too much time on Buffett. George Soros has 2 million times more statistical evidence that his results are not chance than Buffett does. Soros is vastly more robust. I am not saying Buffe...
What kind of rate of return can an average, equities-focused algorithmic trading firm expect to achieve today? I come from a background of control and optimization, working in the industry in China, but I also work with a team to do investments and trading on the side. In our market, which has a very different set of r...
If I have a time series that exhibits mean reverting properties, does it necessarily mean that the time series is mean stationary?
I am developing a factor model to predict monthly returns. One of the factors alone accounts for an R squared of 0.3 to 0.4 for many single periods that has surprised me. However, for some periods the direction of the factor reverse completely and if I run a single regression for all the periods this factor alone acc...
Somebody was telling me that if you buy randomly and assuming no transaction costs in todays market place, you wont make money 50% of the time and lose 50% of the time because of adverse selection. Im not quite sure I follow, does anyone know what this could be about?
The Setup Assume the inside market is $15.15 \times 15.16$ and there is a very large bid order imbalance. For example, 30,000 shares bid across 100+ orders, 200 shares offered across 1 order; however, it is not always this extreme. Approximately 10-1000$\mu$s prior to a tick up I've seen numerous occasions where a sing...
ERROR: type should be string, got "https://www.google.com/finance?q=NYSE%3AAOL&ei=yZCpUODEMsKqqgHPzQE\nPreviously, I assumed \"Inst. Owned\" meant the percentage of the company's stock that was owned by the company (viz. not floated), then I started to believe it meant the percentage of the stock which was owned by institutional investors. I still believe/assume that, but now I see AOL is 103% \"Inst. Own\", which carries me to the temporary assumption that AOL is being shorted right now? \n"
You can't calculate an actual/real angle with the sine function with discrete market data. I need a substitute value for inputs that require an angle value. If you're only calculating the angle between two adjacent bars, is it possible to use the distance formula as a proxy (x=1)? Distance between two points: c = Squar...
I am writing a white paper in which I am trying to compare a strategy to different well-known - and classic - asset allocation optimization approaches. One of the methods I chose is the minimum variance portfolio $w_\text{MV}$ defined as follows: $$w_\text{MV} = \underset{w}{\arg \min} ~ w' \Sigma w$$ where $\Sigma$ is...
Falkenblog reports an interesting finding: All of the stock returns since 1993 are from overnight returns and cross-sectionally, volatility receives a positive overnight risk premium, a negative intraday one: Another Overnight Return Puzzle My questions Is this a known anomaly (At least I have never heard of it)? Is th...
I'd like to do a portfolio optimization of a set of ETF's but want to avoid traditional problems with normality assumptions in returns etc. Are there techniques that let me sample 'draws' from the emprirical distribution and apply those to a monte-carlo style optimization? I reviewed the question on monte carlo samplin...
I have been searching online for a few days regarding how to calculate portfolio VaR for a portfolio consisting of leveraged products - but so far, I have not been able to come up with anything remotely useful and practical (i.e. so that I can implement it in a spreadsheet for example). I am trading custom leveraged pr...
Bakshi et. al. (1997) analyzes the empirical performance of some alternative option pricing models. I am interested to do this as well - hence applying different models - but I am unsure how to handle the OptionMetrics data. Something that stood out from the article for instance is that they adjust the spot stock price...
This is not a homework or assignment exercise. I'm trying to evaluate $\displaystyle \ \ I := E_\beta \big[\frac{1}{\beta(T_0)} K \mathbf{1}_{\{B(T_0,T_1) > K\}}\big]$, where $\beta$ is the savings account, $B$ is the present value (at some time $t$) of the zero coupon bond paying $\$1$ at maturity, $\mathbf{1}$ is th...
I want to simulate stock price paths with different stochastic processes. I started with the famous geometric brownian motion. I simulated the values with the following formula: $$R_i=\frac{S_{i+1}-S_i}{S_i}=\mu \Delta t + \sigma \varphi \sqrt{\Delta t}$$ with: $\mu= $ sample mean $\sigma= $ sample volatility $\Delta...
This is something I've been thinking about for a while but I can't reach a clear conclusion. When we calculate, for example, the profit factor for a pairs trading strategy, do we treat each pairs trade as a single result or each of the separate trades on each instrument as a single result? For example, lets say we are ...
I want to simulate stock prices with the variance gamma process. The model is given by: $S_T=S_0 e^{ {[}(r-1)T + \omega + z{]}} $ where $S_0= $ starting value $T= $ Time $\omega=\frac{T}{\nu}ln(1-\theta \nu - \sigma^2 \frac{\nu }{2})$ $r= $ interest rate $z= $ normally distributed variable with mean $\theta g$ and sta...
The theory of delta hedging a short position in an option is based on trades in the stock and cash, i.e. I get the option premium and take positions in the stock and cash. In the classical no-arbitrage theory, I have the following if I am short an option, get the premium and hedge the structure with the stock: $$ \rm M...
How do you calculate the Potential Future Exposure (PFE) for a swaption? Do you incorporate the dynamics of implied volatility when you are running your simulations? Is there a standard way to model the real-world joint dynamics of rates and volatilitiess?
A question from an interview book: When can hedging an options position make you take on more risk? The answer provided is the following: Hedging can increase your risk if you are forced to both buy short-dated options and hedge them. And it gives an example that you short the stock to hedge, and the stock price ri...
Is there a absolute dollar form of the Kelly equation $f=\frac{m}{s^2}$? (i.e. one that does not use percent returns).
I am talking about the Merton Jump Diffusion model, on this page, where they give the following formula: $$ dS_t = \mu S_t dt + \sigma S_t dW_t + (\eta-1) dq$$ where $W_t$ is a standard brownian motion, and $dq$ is an independent Poisson process (its value is 1 with probability $\lambda dt$) On that page you can find s...
I have question regarding final loading of data back to original variables. So for example: I have 10 variable from a,b,c....j using returns for last 300 days i got return matrix of 300 X 10. Further I have normalized returns and calculated covariance matrix of 10 X 10. Now I have calculated eigen values and ei...
I'm trying to price a "power contract" and would appreciate guidance on the next step. The payoff at time $T$ is $(S(T)/K)^\alpha$, where $K > 0$, $\alpha \in \mathbb{N}$, $T > 0$. $S$ is adapted to $\mathscr{F}$, and we are currently at time $t \in [0,T)$. Let $Q$ denote the risk-neutral measure and $\beta(t) = e^{\in...
Please tell me where I've gone wrong (if I did in fact make a mistake). I'm pricing a long forward on a stock. The usual setup applies: This has payoff $S(T) - K$ at time $T$. We are at $t$ now. $S(T) = S(t)e^{(r-\frac12 \sigma^2)(T-t)+\sigma(W(T)-W(t))}$. $W(t)$ is a Wiener process. $K \in \mathbb{R}_+$. $Q$ is the...
Given the nominal bond yield and the inflation index bond yield (earning yield), how would one calculate the discounted inflation rate (discounted earning growth rates)? These two factor seems to explain a lot of the return of asset classes which I like to explore more. Edit: From an article that I couldn't find anymo...
From the formula of the delta of a call option, i.e. $N(d1)$, where $d_1 = \frac{\mathrm{ln}\frac{S(t)}{K} + (r + 0.5\sigma^2)(T-t)}{\sigma\sqrt{T-t}}$, the delta of an ATM spot call option is slightly bigger than 0.5. However, this is unintuitive to me... can anyone explain why? Also, is there any way to interpret wha...
It is relatively easy to estimate the parameters of an autoregressive $AR(p)$ process. How do I do with a moving average $MA(q)$ process?
In Russia, options on futures on the RTS index are priced in points instead of currency, with points being directly related to the value of the US dollar such that, for example, if the dollar rises, the index drops by that amount. My question: would I need to factor this into the model when pricing options on futures o...
I have written an algorithmic trading program which relies heavily on low spreads in the 0.1-0.3 PIP region. I was now wondering if it would be a good idea to place bid/ask offers instead of limit orders to guarantee a low enough spread. The problem I see with that is that of course I can't be sure that the trade goes ...
I have a returns process that is drawn from a normal distribution with a nonlinear time-varying drift, so I was wondering if the entropy pooling method still applies or if I need an invariant ?
Here is my question: This is a question about Black-Scholes model, but it may be applicable to more complicated models. Throughout the discussion, the strike price $K$, interest rate $r$ and volatility $\sigma$ will be assumed to be constant. The thing we are interested in is the time decay of the option. First conside...
Does anyone know if I can access interest rates series from the treasury using R? I tried yahoo! Finance and it doesn't seem to have this kind of information.