instruction
stringlengths
35
27.7k
I have the following question. Consider that you have a stock currently trading at 100\$. In one month it can jump to 120\$ with probability 99% and go to 80\$ with probability 1%. How much is call option with strike at 110$ worth now? So when you do replication portfolio consisting of 0.25 stock and -20\$ gives exactl...
I am trying to figure-out an optimal policy for buying a unit when its price follows a mean-reverting price process (Ornstein–Uhlenbeck), when I have a finite time deadline for buying the unit. I tried to search the literature for it, but couldn't find anything. I would very much appreciate any help.
Can I take liquidity risk determinant as a dimension of it in order to examine the impact of liquidity risk on performance of banks? For example in a literature, Tangibility i.e., ratio of fixed assets to total assets was used as a determinant of liquidity risk and results found to have significant relationship of this...
I'm a developer writing a system for a startup. Without giving away too much of the business model, here are the basics of how it works: The web site has two forms of "currency": tickets and credits. Tickets are basically like Chinese auction tickets: there are many prize items on the site, and you can cash in your t...
The parametric VaR is defined as follows: $$VaR=Z_a*Vol$$ Is this the best way to interpret how much risk is being taken on for a particular asset? How does one interpret volatility on its own if its not converted into a percent figure? Therefore, wouldn't be better if sharp ratios were expressed in VaR's? I mean, wha...
Trying to understand the Eurdollar market a little better. I understand it's the market for dollar denominated deposits outside the US (not just in Europe). They are unregulated and not subject to reserve requirements, unlike traditional deposits. The players that engage in the Eurodollar futures are wide reaching inst...
I am dealing with a strategy that is not high-frequency based. The strategy consumes normalized data from Bloomberg and Reuters. For US equity market, can someone recommend some real-time data sources - other than Bloomberg/Reuters/IB - that are known to be reliable? By the way, subscription cost is not an issue.
I have started reading about HMM it gives an intuitive idea about what HMM is all about. I am looking out for example where its applied to Equity model using R / Excel. The material which I read so far is about its application to speech recognition.
If some conditions are met (stop loss, trailing stop, take profit...) we will close ours positions (sell/buy) to avoid having more loss or to ensure profit. In an automatic trading system, it is easy to set-up these rules. But is there an automated strategy / rule to re-activate our strategies? For example: simulate o...
Say swap would be used to convert the payments of its portfolio of fixed-rate residential mortgage loans into a floating payment. Why might a manager consider using an interest-rate in which the notional principal amount declines over time?
Currently we compute portfolio risk and return via our own C# program. Historical data is stored in a SQL database. We want to compute the risk and return parameters - given a portfolio (i.e. not computing the efficient frontier). It's the R syntax that we're not familiar with (Vs the theory of computing the risk-retur...
Let's say I have an arbitrary set of $n$ period returns for $k$ assets, and a given $k \times k$ correlation matrix (of asset returns), which is known a priori. Does it makes sense, or is it even possible, to think about constructing some kind of measure of whether the set of $n$ returns is consistent with the known c...
Let you have several issuers, and let each issuer have its yield curve built up with liquid plain vanilla fixed rate bonds. Each yield curve has its slope and its curvature, and they obviously change over time (if the yield curve didn't change its shape over time, you would be able to predict with great accuracy the pr...
I read somewhere that derivatives are the biggest weapons of financial destruction. Why do we need derivatives? If exploiting risk-proneness of people to make profit is the goal, why don't we stop with stocks alone? Derivatives also entail complicated math for their pricing while stock prices are usually modelled as Br...
Why is it so popular to use market capitalization weighted indices instead of taking the first principle component that explains the most variation of the constituents? I haven't yet seen an academic study that does the latter. What's the reason for this? If the correct answer varies based on application then feel free...
Simple question - what would be the fastest algorithm for calculating retrospective maximum drawdown ? I've found some interesting talks but I was wondering what people thought of this question here.
I am testing various optimization methods for a currency-only portfolio. I have a vector of expected returns for the major developed currencies vs. the USD each week (based on a proprietary model). I then take the annualized vol of each currency and dump it all into an optimizer, looking to run a portfolio of currency ...
I have two related questions concerning Black Scholes and delta hedging. I thought about this two questions, but I could not come up with an answer, so maybe you guys & girls can help me: If an option is at the money, how can the Black Scholes price be calculated in a very fast way (possibly without any big calculatio...
When working with risky bonds, i.e. corporate bonds, what is usually defined as the yield of such a bond? Is it the yield calculated as if the bond was riskless, or is it calculated by properly taking into account the default risk in this case? And what about (risky and riskless) floating rate notes?
I found this comment in a book I bought about risk management: Risk Management in Banking by Joel Bessis. This is the well-known rule that states that the sum of individual risks is less than the risk of the sum, or, that risks should be sub-additive. Risks do not add up algebraically because of diversification....
I am working on Rubinsteins IBT and use the following paper to implement this into excel: http://papers.ssrn.com/sol3/papers.cfm?abstract_id=541744 the original paper can be found here: http://www.haas.berkeley.edu/groups/finance/WP/rpf232.pdf I am stuck in the last step: I calculated the path probabilities, denoted by...
Let us consider an American call option with strike price K and the time to maturity be T. Assume that the underlying stock does not pay any dividend. Let the price of this call option is C$^a$ today (t = 0). Now, suppose that at some intermediate time t ($<$T), I decide to exercise my call option. Hence the profit is...
I am uncertain as to how to calculate the mean and variance of the following Geometric Ornstein-Uhlenbeck process. $$d X(t) = a ( L - X_t ) dt + V X_t dW_t$$ Is anyone able to calculate the mean and variance of this process as well as include the calculations for the solution?
In which markets are inflation swaps considered liquid enough to be the primary instrument for measuring market inflation expectations (compared to say, inflation-linked bonds)? Are there specific biases that will cause implied inflation rates from the bonds to diverge significantly from the swap rates? many thanks!
Why do short term implieds move more than long term?
I was looking at this video today: http://www.cmegroup.com/education/interactive/webinars-archived/implied-price-functionality.html on implied pricing. And am aware that implied orders/pricing exists in ICE as well. I found it difficult to follow (the video) beyond the vanilla examples and was wondering what other reso...
Following up on this question: Yield of a risky bond, what is the definition of clean and dirty prices for a risky (defaultable, catastrophe, etc.) bond? I would think the dirty price should basically be the discounted cashflows. Then the clean price should be dirtyPrice-accruedAmount. What is the accruedAmount though...
Let you have a mean reverting stochastic process with a statistically significant autocorrelation coefficient; let it looks like you can well model it using an $ARMA(p,q)$. This time series could be described by a mean reverting stochastic process like $dS=k(\theta-S_{t})dt+\sigma S_{t}^{\beta}dz$ where $\theta$ is the...
I am looking for a nice and readable description of how to implement BDT model: $d log(r(t)) = [\theta(t)-\frac{\sigma'(t)}{\sigma(t)}log(r(t))]dt + \sigma(t) dW$. I assume I already have steady-state IR curve $r^*(t)$ and volatility curve $\sigma^*(t)$. It makes no difference whether it would be binomial tree or Mont...
I am currently working on ARMA+GARCH model using R. I am looking out for example which explain step by step explanation for fitting this model in R. I have time series which is stationary and I am trying to predict n period ahead value. I have worked on this model but I am looking out for example where auto.arima() fun...
How would you handle a negative interest rate in index/equity options valuation? An example would be negative rates for short term maturities for Swiss Frank (CHF).
I've read the so-called "leverage-effect" for stocks models the fact that if a company is leveraged, its volatility should increase as the stock price moves lower and closer to the level of debt. Can someone please explain this to me?
Clearly there is a strong relationship between credit spreads and equity prices (both theoretically and empirically). But how would one go about formulating a regression which seeks to explain this relationship? To keep it narrow, let's say we have the following time series data; S&P500, daily % changes Generic 5 yea...
I want to generate a random vector $z$ of dimension $k+m$ with some given correlation matrix $\Sigma$, such that the first $k$ elements of the vector are distributed normally and the last $m$ elements follow the Gamma distribution with some given parameters $a,b$. Hier is suggested (applied to this case) to generate a ...
I am currently writing a paper on asymmetric volatility modeling of brent, gold, silver, wheat, soybean and corn from 1986-2012 and divided them into 4 sub-sample periods (i.e. 1986-1991, 1991-1997, 1997-2005, 2005-2012 and where the no. of observations are: 1515, 1515, 2000, 2000, respectively) and I have some questio...
For a college project I'm tasked with implementing prediction market. Which model of it I'd better choose? I want something useful and simple enough for other people to quickly understand and use. (This project is to be used in campus internally). For now on I'm considering binary option model, but as I understand buy...
I am reading a chapter on bond futures in Fabozzi's book. It states that without CF (conversion factor) the CTD (cheapest to deliver) would be the bond with the longest maturity and highest coupon. Why is this? Higher coupon means higher PV (present value). Can anyone assist?
I would like to know if someone could provide a summarized view of the advantages and disadvantages of the approaches on the volatility surface issues, such as: Local vol Stochastic Vol (Heston/SVI) Parametrization (Carr and Wu approach)
What are the approaches available to price a swaption (either European or American style)? So far it seems Black method is the only one used. Thanks!
Among the several weighting schemes used for constructing volatility indices, which ones are the best for forecasting (realized) volatility? I've constructed a volatility index for emerging markets using a (very simple) trade-weighted approach, which has 84% correlation with the VIX (2007-2012). The construction proced...
In quantitative finance, we know we have a lot of option price models such as geometric Brownian motion model (Black-Scholes models), stochastic volatility model (Heston), jump diffusion models and so on, my question is how can we use these models to make money in practice? My comments: Because we can read option price...
In technical analysis, we may use confluence of direction for 3 timeframes to roughly gauge bias of market now. Similarly, if we use time series forecasting methods to predict(say daily data-whether S&P is going higher tomorrow), how much historical daily data would be optimal(bet 2 weeks-1month-3 months)? Too much or ...
Can anyone tell me whether results as predicted by Brownian Motion for a given mean and std, match what you get by measuring actual drawdown from simulated results over a number of iterations?
I have a binomial option-pricing model (I don't think the details of how its implemented are relevant). However, when I go to calculate vega, I am essentially running the model a second time with new volatility input we call $\sigma + \epsilon$, where $\sigma$ is the volatility used to calculate the price. I then have ...
I've always wondered why do one use squared or absolute returns to determine if volatility modeling is required for the return series? We understand that there are various tests for its autocorrelation and conditional heteroskedasticity. However, I don't quite grasp the concept behind it. Can anyone kindly explain what...
I have been looking into ways to better understand how the dependencies/correlations/etc between two time series can vary over time. I first thought about using a Kalman/particle filter over a linear model to get a time-varying slope estimate. However, I'm worried that this will also pick up changing relative variance...
Should I include or not the days a strategy has no open positions (thus no returns) in the Sharpe ratio calculation?
I am a one-man operation, and would like to hire a quant for around 4 weeks or work. I am worried that the person I hire might copy my data or the indicators that I have him work on. What have others done to protect their assets from re-use by employees and contractors? Additional info: I work from home, so not able ...
I need to generate one-minute bars out of one-day bars to test the performance of an algorithm (speed, memory usage, etc). I don't need them to resemble real data, but they should be consistent with the one-day bars (e.g. the higher price of any of the minute bars for a day is the same as the high price of the one-minu...
This source (PDF) gives the closed-form for vomma (or volga, i.e. the second derivative of price w.r.t. volatility) of the Black Scholes option pricing model as: $$S_{0}e^{-qT}\sqrt{T}\frac{1}{\sqrt{2\pi}}e^{-\frac{d_{1}^{2}}{2}}\frac{d_{1}d_{2}}{\sigma}$$ where $$d_{1} = \frac{ln(S_{0}/K)+(r-q)T + \sigma^{2}/2T}{\sig...
I am using the paper "A Sharper Angle on Optimization" by Golts and Jones (2009) as a basis for my (minor) masters thesis in mathematical finance. The paper focuses on the mean-variance analysis of Markowitz but instead turns attention to the vector geometry of the returns vector and vector of resultant portfolio weigh...
I came across some graphs depicting the delta of a down-and-out call. They show that, if the risk free rate of return is 0, the delta is constant at 1. However, if the rate of return is for example 5%, the delta rises as the stock price approaches the barrier. I can't figure out why.
This question was originally posted on Stackoverflow: As part of the Formula.js project, I'm trying to re-implement Excel's ACCRINT function (in JavaScript, but the language should not matter). I've been trying to find a proper description for how it's supposed to work (especially with respect to the first_interest par...
In the process of my research I very often come across academic papers regarding modelling and trading strategies that in one way or another incorporate some technical indicators. For example in some papers, rather than taking the raw time-series as input to the model, things like MACD, SMA, EMA and RSI of the time-ser...
When applying the Heston model to generate the sample volatility surface, some of the volatility value will be negative. I am just wondering what do practioners normally do with these negative value. Do you simply ignore it; set negatives to 0; or square it, take absolute values, or something else?
I understand that the simplest way of calibrating a Heston model for volatility surface is to use Monte-Carlo to simulate the vol and stock price trajectories and then use the observed price to do a optimization. However, I am just wondering if there is a more "clean" way to calibrate the model and how would it be bett...
The square-root model is widely used to model equity market impact. It assumes that volatility, traded volume, total volume, and a spread cost are the drivers of slippage. Jim Gatheral has an excellent summary of the process here. There is a coefficient that is estimated via regression on a realized trade schedule. Th...
In Basel III the CVA VaR “is restricted to changes in the counterparties’ credit spreads and does not model the sensitivity of CVA to changes in other market factors, such as changes in the value of the reference asset, commodity, currency or interest rate of a derivative.” So, in the general dependent case (WWR/RWR), ...
How do the in-sample estimates and out-of-sample estimates I so often hear authors refer to in emperical analysis of MVO differ?
I am looking for overview references on software companies that develop applications in the following domains: asset and portfolio management risk management derivatives pricing trading quant modelling I am also interested in different approaches, like: buy and sell side products commercial and open source products ...
How to create charts for market data in WPF? Are there any charting controls provided by microsoft or you need to use only third party controls? Which are the popular third party charting controls used predominantly by banks?
I have encountered numerous copula estimators that can estimate time-invariant and time-varying linear and non-linear correlations on the interval $[-1,1]$, and these estimators are fully consistent with arbitrary univariate marginals and different forms of the bivariate joint distribution. I have also encountered cop...
There is a vast literature on copula modelling. Using copulas I can describe the joint law of two (and more) random variables $X$ and $Y$, i.e. $F_{X,Y}(x,y)$. Very often in risk management (credit risk, operational risk, insurance) the task is to model a sum $$Z=X+Y$$ and find its distribution $$F_Z(z) = F_{X+Y}(z)$$ ...
Suppose we are in the mean-variance optimization setting with a vector of returns $\alpha$ and a vector of portfolio weights $\omega$. In a robust setting, the returns are assumed to lie in some uncertainty region. I came accross a paper which lets this region, call it $U$, be given by the sphere centered at $\alpha...
Are there any derivatives which pay amount $a(p-b)^{2}-c$ where $p$ is the price of underling asset ? (or in the case of options $max(0,a(p-b)^{2}-c)$) I'm not very strict here but I only want to know if there are any derivatives which profile of profits is quadratic function of price of underling assets (quadratic on ...
If it exists, has been agreed on, and F# programmers have used it extensively, I would like to know what is the industry standard Quant Finance library for F#. What typical finance scenario(s) have you had success with for this library?
This article contains the following statement. In terms of liquidity detection, traders intend to decipher whether there are large orders existing in a matching engine by sending out small orders (pinging) to seek for large orders. When a small order is filled quickly, there is likely to be a large order behind ...
I'm working in order to compare the calculation of the VaR between the methodology of copulas and kernel density, all this by using the software r. The process that I follow is: Obtain a sample (which is bivariate) Estimate the density of the data by kernel of Epanechnikov (for X1 and X2 as marginals) Calculate the ba...
I'm curious as to how many academic studies and industry white papers are actually using daily data to report intramonth drawdowns; specifically, when the papers are often reporting monthly signals, statistics, and performance. I would think it would be obvious that honest reporting would report risk statistics using d...
What are some good ways to estimate the capacity of a strategy from historical data (including full market depth)? Obviously, a naive approach is that you want the strategy's returns to exceed its market impact. PBs mostly provide their institutional clients with software packages that estimate market impact for large ...
Assume that you are given an arbitrary payoff profile for European vanilla position (e.g. butterfly). How to make a back of the envelope sketch of a second order greek profile for it (i.e. plot showing dependency of a greek w.r.t. to spot or vol)? I'm interested in major second order greeks like Dvega/Dvol, Dgamma/Dsp...
I would like to ask about maybe obvious thing for many people, but cannot find a good answer for it. In many, many places I see OHLC data along with OHLC analysis tools. As I deduce step by step in my calculation I think the Volume Weighted Average Price (VWAP) is the better choice. I see OHLC as a lossy compression of...
I am working through this paper. I want to implement the robust Bayesian optimization (see pages 6 onward) in Matlab using fmincon. Here is a brief overview of my problem: Let $\alpha$ be the vector of returns and let $w$ be ta set of weights representing a portfolio. Then, our usual mean-variance problem is to find t...
Recently a promising start-up (Ayasdi) has made headlines. They are a spin-off of the Applied and Computational Algebraic Topology group of Stanford University (ComTop). What they basically do is visualizing the topological structure of Big Data. Now I know that this idea of applied (algebraic) topology crops up from t...
I have successfully chosen and estimate a copula for the ranks of the log-returns of my actions. My question is, since I have worked with the ranks instead of directly the log-returns (in order to be in $[0,1]$) how can I simulate new data for the log-returns from my copula? To be more clear, here is the code commente...
I would like to model liquidity effects in my risk model which is based on historical simulation. I would like to develop a practical solution that still captures liquidity effects. Most probably I have to treat equity markets and bonds markets separately but finally I would like to be able to apply some procedure for ...
In [1], the authors state that "Although some studies apply the curve-fitting method directly to option prices, the severely nonlinear relationship between option price and strike price often leads to numerical difficulties. [...], we apply the curve fitting method to implied volatilities instead of option prices". I'v...
I have a question regarding the simulation of a GBM. I have found similar questions here but nothing which takes reference to my specific problem: Given a GBM of the form $dS(t) = \mu S(t) dt + \sigma S(t) dW(t)$ it is clear that this SDE has a closed form solution in $S(t) = S(0) exp ([\mu - \frac{1}{2}\sigma^2]t + ...
How can I test the significance of a pair trading strategy, i.e. that the H0 is "The strategy has no predicting power". I was considering to use the technique in Evidence Based Technical Analysis that test the strategy against a benchmark built by detrending the price series, but I think that this doesn't work in the p...
I have a degree in mathematics, and I've worked as a statistician and done some programming work. I'm very strong in my math/stats/programming background and have browsed some QF books, and I'm very interested. I'm American, but I'm currently out of the country, and I don't know if seeking a hedge fund/firm where I am ...
I am interested in references on research regarding the consistency of economic scenarios in nested stochastics for risk measurement. Background: Pricing by Monte-Carlo: For pricing complex derivatives Monte-Carlo simulation is a well established method. It works by generating iid samples of the underlying risk-factor...
My question is rather intuitive than formal and circles around the derivation of Ito's Lemma. I have seen in a variety of textbooks that by applying Ito's Lemma, one can derive the exact solution of a geometric Brownian Motion. So, if one has $dS = a(S,t)dt + b(S,t)dZ$ the first part on the right side of the equation ...
I am very confused about why different volatility estimators (RV, RAV, BPV, etc) exist. If the goal is to find the best estimator for stock volatility, and volatility is latent, how do I know which estimator performs the best when the mathematical definition for these estimators are all different? Realized variance = s...
Consider $X= \left( X_t \right)_{t\geq 0}$ is a Lévy process whose characteristic triplet is $\left( \gamma, \sigma ^2, \nu \right)$ and where its Lévy measure is $$ \nu \left( dx\right) = A \sum_{n=1} ^{\infty} p^n \delta_{-n}\left( dx \right) + Bx^{\beta-1}\left( 1+x \right)^{-\alpha -\beta}e^{-\lambda x } \mathbf{...
Can anyone kindly point out if I made any mistakes in making predictions using quadratic regression model in time series? I called the predict() function with the appropriate data vector and model, but the predictions do not sit well with what I observe on the time plot. I will like to know if there's anything wrong wi...
So far, I have been performing computations either on my own computer, or using an in-house scheduler that basically chooses a one of the employees' available workstations to run tasks in the background. As we are now performing more and more lengthy computations, our personal stations begin to be used all the times pa...
As we converge on the minute time scale and below for our unit time interval, the return distributions tend to be leptokurtotic and more discretized (due to fixed values such as minimum price increment of a security, commission and liquidity rebate). Moreover, if we are analyzing the VaR/CVaR of a model or strategy for...
In fitting a curve I found that people are using the following tenors: U1 Z1 H2 M2 U2 Z2 2Y Could you please let me know what exact time periods they stand for? Is there a web page describing them?
I am looking for one line formula ideally in Excel to calculate stock move probability based on option implied volatility and time to expiration? I have already found a few complex samples which took a full page of data to calculate. Is it possible to simplify this calculation in one line formula with the following var...
This is a cross-post from here In my question on a load forecast model using temperature data as covariates I was advised to use regression splines. This really seems to be a/the solution. Now I face the following problem: if I calibrate my model on winter data (for technical reasons calibration can not be done on a da...
I am trying to work out how to determine weights for the assets in order to form a portfolio. The ratio I am using is EV/EBIT, hence the smaller the better. The problem is I don't know how to handle it when EV < 0. Obviously that is kind of a 'free lunch' mathematically speaking and I realise the discontinuity at x/0 i...
Ok, obviously I am buying lower strike put and selling higher strike put. What is the recommended volatility and greeks to consider in my trade? Volatility: Average volatility between both legs? Long volatility minus short volatility Delta/gamma/theta/vega: Average Delta/gamma/theta/vega between both legs? Long Delt...
I have a question about Random forests and how they could be utilized in trading? I heard Random forests are used for classification, is that accurate? If so, could someone give an example of what sort of classification does it help with? If not, what are Random forests used for in Quant finance?
Suppose, there is a HF strategy (agent) that is based on order book microstructure, and it is able to make good executions locally. More formally, in average its execution price is better than asset price $\tau$ sec. after the execution. Suppose, we manage two such agents: one for long orders, another for short orders....
I have calculated my optimal portfolio weights following the mean-variance framework where I go $w_1$ in the risky asset and $1-w_1$ in the risk free rate. I get the following result: $w_1$ = 1.5, 1-$w_1$ = -0.5 My question is, how can I interpret this? Obviously I need to short the risk-free rate and go long in the ri...
Whats the relationship between the Kelly criterion and the Sharpe ratio? $$ f=\frac{p(b+1)-1}{b} $$ where $f$ is a percentage of how much capital to place on a bet, $p$ is the probability of success, and $b$ is the payout odds (eg. 3 dollars for ever 1 dollar bet). Is $b$ (the payout ratio) also the Sharpe ratio? I am ...
I have 5 bonds (with maturities 1,2,3,4,5 years) which I calculated the yield curve for 10 days. I also calculated the forward rates from the yield rates. Now I've been told to calculate the covariance of the yield rates and the forward rates, as well as their eigenvalues/eigenvectors. I'm assuming the covariance of t...
How useful are quantitative techniques for the risk analysis/management of a open real estate fund? I am thinking about an approach for Europe (US and other markets are probably quite different - usually more transparent). There are several factors for the valuation of an object in the fund: Income stream from rent p...
The data product "TAQ NYSE Order Imbalances" from the New York Stock Exchange is in a format that is described pretty well in sections 4.8, 4.9, 4.10, and 5 of the document "NYSE Order Imbalances Client Specification", version 1.12, q.v. Briefly, it's a mix of ASCII and binary: stock symbols, for example, are in plain ...
I keep struggling with testing 9 samples if they are stationary. Each of these samples is a real valued time series with 714.000 values. If I use the KPSS test with the each compleete sample set, the hypothesis is rejected. But, if I split each sample in 20 parts of equal size, then test all these sample parts with KPS...