Quotation

In this Part 1, first, we look at the tail of an asset return distribution and compress our knowledge on Value-at-Risk (VaR) to extract the essence required to understand why VaR-stuff is not the best card in our deck. Next, we move to a classical Bayes’ theorem which helps us to derive a conditional probability of a rare event given… yep, another event that (hypothetically) will take place. Eventually, in Part 2, we will hit the bull between its eyes with an advanced concept taken from the Bayesian approach to statistics and map, in real-time, for any return-series its loss probabilities. Again, the probabilities, not certainties.

Read this excellent post and accompanying Pathon codes at http://www.quantatrisk.com/2015/06/14/predicting-heavy-extreme-losses-portfolio-1/

Tags - python , portfolio , var

A new

American options,

European options,

Asian options,

Barrier options,

Binary options,

Currency translated options,

Lookback options,

Multiple assets options and

Multiple exercises options

European options,

Asian options,

Barrier options,

Binary options,

Currency translated options,

Lookback options,

Multiple assets options and

Multiple exercises options

Many more models are being implemented currently and will be added soon to AirXCell. In addition to the

This form is very valuable to quantitative researchers or any finance professional who needs to compute theoretical option prices easily and who is looking for a reliable option pricer.

The Option pricing form presents the user with an HTML form enabling her to set up the model with the required parameters values such as the underlying asset price, the strike price, the volatility of the underlying asset, etc.

For instance, the following form is presented to a user requesting the price of an european option using the Generalized Black Scholes model:

Again, there are many more models and option types coming soon as well as other forms for various other kind of calculations, still mostly oriented towards financial calculation.

Tags - option , pricing , r

Disclaimer: the videos are embedded from Youtube uploaded by others, some are full version and others are Trailer. Please consider to buy the movies from Amazon.

A young and impatient stockbroker is willing to do anything to get to the top, including trading on illegal inside information taken through a ruthless and greedy corporate raider who takes the youth under his wing.

An examination of the machinations behind the scenes at a real estate office. A story for everyone who works for a living.

A snobbish investor and a wily street con artist find their positions reversed as part of a bet by two callous millionaires.

A college dropout gets a job as a broker for a suburban investment firm, which puts him on the fast track to success, but the job might not be as legitimate as it sounds.

The film documents the impact on the development of the personal computer of the rivalry between Apple Computer and Microsoft. It spans the time period of the early 1970s to 1997, when Steve Jobs (Noah Wyle) and Bill Gates (Anthony Michael Hall) develop a partnership after Jobs returns to Apple Computer.

An eccentric marketing guru visits a Coca-Cola subsidiary in Australia to try and increase market penetration. He finds zero penetration in a valley owned by an old man who makes his own soft drinks, and visits the valley to see why. After "the Kid's" persistence is tested he's given a tour of the man's plant, and they begin talking of a joint venture. Things get more complicated when the Coca-Cola man begins falling in love with his temporary secretary, who seems to have connections to the valley.

A talented young man can't get an executive position without rising through the ranks, so he comes up with a shortcut, which also benefits his love life.

A middle-aged ad exec is faced with a new boss who's nearly half his age... and who also happens to be sleeping with his daughter.

Ted, a stuffy white guy from Illinois working in sales for the Barcelona office of a US corporation, is paid an unexpected visit by his somewhat less stuffy cousin Fred, who is an officer in the US Navy. Over the next few months, both their lives are irrevocably altered by the events which follow Fred's arrival, events which are the trivial stuff of a comedy of manners at first but which gradually grow increasingly dramatic.

When a sports agent has a moral epiphany and is fired for expressing it, he decides to put his new philosophy to the test as an independent with the only athlete who stays with him.

Comedic tale of company workers who hate their jobs and decide to rebel against their greedy boss.

Documentary that looks at the concept of the corporation throughout recent history up to its present-day dominance.

A research chemist comes under personal and professional attack when he decides to appear in a "60 Minutes" expose on Big Tobacco.

A naive business graduate is installed as president of a manufacturing company as part of a stock scam.

A computer programmer's dream job at a hot Portland-based firm turns nightmarish when he discovers his boss has a secret and ruthless means of dispatching anti-trust problems.

Rogue Trader tells the true story of how one man managed to bring down England's best respected merchant bank. Ewan McGregor plays Leeson, an ambitious young man from North London who is hired by the Barings Brothers Bank and sent to Indonesia to help untangle some problems with bearer bonds. Leeson does well enough to earn a transfer to Singapore, where he's put in charge of Barings' staff at the Singapore International Money Exchange.

A corporate raider threatens a hostile take-over of a "mom and pop" company. The patriarch of the company enlists the help of his wife's daughter, who is a lawyer, to try and protect the company. The raider is enamoured of her, and enjoys the thrust and parry of legal manoeuvring as he tries to win her heart.

A computer specialist is sued for sexual harassment by a former lover turned boss who initiated the act forcefully, which threatens both his career and his personal life.

After an accident, a chauvenistic executive gains the ability to hear what women are really thinking.

The president of a major tobacco company decides to buy the company himself, but a bidding war ensues as other companies make their own offers.

Tags - movie , business , top , world

As the website describes:

Quotation

You can get the price (and the Greeks) of the available options by applying several methods:

- Black & Scholes model for european options and greeks calculation.

- Bjerksund & Stensland model for american options.

- Binomial model (Cox, Ross & Rubinstein, Jarrow-Rudd Risk Neutral, Tian) for american and european options.

- Shifted Lognormal model for european options.

- Partial Differential Equation (PDE) approach: Finite Difference (FD) and Radial Basis Function (RBF) methods for american and european options.

- Monte-Carlo for digital option (Cash-or-Nothing) and european options and greeks estimation (FD and Malliavin).

Volatility models (SABR with calibration, Lognormal model, etc.) are also available.

- Black & Scholes model for european options and greeks calculation.

- Bjerksund & Stensland model for american options.

- Binomial model (Cox, Ross & Rubinstein, Jarrow-Rudd Risk Neutral, Tian) for american and european options.

- Shifted Lognormal model for european options.

- Partial Differential Equation (PDE) approach: Finite Difference (FD) and Radial Basis Function (RBF) methods for american and european options.

- Monte-Carlo for digital option (Cash-or-Nothing) and european options and greeks estimation (FD and Malliavin).

Volatility models (SABR with calibration, Lognormal model, etc.) are also available.

I randomly tested the option calculators, they are working well, on top of that, the site is created by a French master student. So it is fine to give him credit with a separated post. Check it at http://pricing-option.com/Default.aspx.

Tags - option

In the paper "

Download the paper and accompanying Python codes at http://www2.visixion.com/dok/Fast_MCS_SVSI.pdf

Tags - monte carlo , simulation , american

Cheers,

Biao

PS: Nick, thanks a lot for your reply, I have tried your way & it took me 1 hour and 16 minutes to import my 40 million lines CSV into MySQL on my humble laptop. That's great. My next task then is to check the performance of RMySQL package.

LOAD DATA INFILE 'data.csv' INTO TABLE tbl_name

FIELDS TERMINATED BY ',' ENCLOSED BY '"'

LINES TERMINATED BY '\r\n'

IGNORE 1 LINES;

FIELDS TERMINATED BY ',' ENCLOSED BY '"'

LINES TERMINATED BY '\r\n'

IGNORE 1 LINES;

Tags - mysql , csv

Quotation

7.7% of all reports in TRACE are errors and in some cases up to 18% of the reports should be deleted. Failing to correct for these errors will bias popular liquidity measures towards a more liquid market. The median bias for the daily turnover will be **7.4%** and for a quarter of the bonds the Amihud price impact measure will be underestimated by at least **14.6%**.

Should you are also worried about these issues, I suggest you to read the paper Liquidity biases in TRACE and contact the author for the SAS programming code used for filtering.

Tags - trace , bond , data

This is the most widely used & straightforward method, as its name suggests, basically, to estimate dy/dx, we increase x by a very small quantity to x1, re-calculate the option value y1, and then estimate the sensitivity as (y-y1)/(x1-x). Thus this method requires us to calculate the option value at least twice (three times for central difference method), and obviously is a big challenge when we have to simulate lots of times.

contrary to finite difference approximation, pathwise derivative estimate derivative directly, without simulating multiple times. It takes advantage of additional information about the dynamics and parameter dependence of a simulated process. Simply put, by the chain rule, if we could find another variable z such that , and there are solutions to the two derivatives at the right hand side, the pathwise derivative estimator can be applied, and for most cases, stock price S(T) for European option or S(tau) for American option is an excellent choice of z, tau is the optimal timing for exercise. Please read the chapter 7 of Monte Carlo Methods in Financial Engineering (Stochastic Modelling and Applied Probability) (v. 53) for detail.

Below are the sample results for the Greeks calculation for an American option without dividend, time to maturity 1 year, 20% volatility. Pathwise derivative estimator saves 2/3 ~ 3/4 computation time.

Delta, Gamma and Vega converge to their true values much quicker, here old and new code refer to

Not bad.

Tags - greeks , monte carlo

Quotation

the goal is to filter your ideal MFE program by the self-defined criteria, for example, you can say "I want to find a MFE program in United States, total tuition less than $40K, and with financial aid"

Bookmark the page Compare & Find MFE, or you can find the link at the menu navigation. I will start to expand the list soon.

Tags - mfe

Please help it grow by visiting QuanTube, rating the video, and most importantly, submit a better video you come across, we appreciate that.

Tags - video

Download the programming files of Estimating exponential affine term structure models at the author's home page http://www.rotman.utoronto.ca/~jcduan/, however, they are in GAUSS language I am unfamiliar with (I used to use it when I studied in Germany seven years ago), so check yourself then.

Tags - filter

I read roughly a working paper

For example, below are two simulated return series, one is under Gaussian copula and the other one is under Student t copula, as you can easily see, although both have the same marginal distribution, Gaussian copula has much smaller upper and lower tail dependence than Student t copula, which eventually underestimates the Value at Risk and other risk measures.

I would stay away Gaussian Copula if I were a risk manager, and you? Download Copula toolbox and other code files at Copula if interested.

Tags - var , copula

1, The Best of Both Worlds: A Hybrid Approach to Calculating Value at Risk by Jacob Boudoukh1, Matthew Richardson and Robert F. Whitelaw. By hybrid it means this approach is a combination of RiskMetrics's parametric method and Historical Simulation. The basic idea is: since we can allocate larger weight to recent data and smaller weight to remote data for exponential weighted moving average (EWMA) volatility calculation, hence improves the backtesting performance of parametric method, why can't we then apply a similar principle to historical simulation? make sense? so it estimates the VaR of a portfolio by applying exponentially declining weights to past returns and then finding the appropriate percentile of this time weighted empirical distribution. The following results are from the paper

2, INCORPORATING VOLATILITY UPDATING INTO THE HISTORICAL SIMULATION METHOD FOR VALUE AT RISK by John Hull and Alan White. The idea is to "adjust" return based on the ratio of current volatility to the past volatility, and use historical simulation on the adjusted returns. Their argument is supposing today's volatility is 20%, while volatility was say, 30%, then past returns obviously exaggerate the current market situation if used directly. They even compare their performance with the first one above and the results are:

source from

Results are promising, aren't they? few lines of codes are enough for the adjustment.

Tags - var

For instance, if you write an equation:

you would get a graph below:

Creat your own at http://www.xamuel.com/inverse-graphing-calculator.php

Tags - graph

The Backtesting framework developed by the Basel committee is the main methodology to judge the performance of VaR model, it typically consists of a periodic comparison of the portfolio’s or asset’s daily VaR values with the subsequent daily profit and loss (P&L). Obviously, the ideal model should generate the times of VaR exceeding P&L equal to (1-alpha) multiplied by time periods for backtesting. For a single equity case it is obvious what we need to do is comparing daily VaR results with daily return; but for a portfolio we have to be careful with the trading positions.

Basel committee (1996) introduces a three-zone approach, where the green zone means the possibility of erroneously accepting an inaccurate model is low; yellow zone is risk manager should be careful to check the model before take action; red zone means the probability of erroneously rejecting an accurate model is remote. For example, the backtesting three zones boundaries for a sample of 250 observations, source from Basel committee, 1996 look like

Backtesting results can therefore be judged by counting the number of exceptions and seeing intuitively which colour zone it falls into.

Alternatively you can rely on some statistical testing, for instance, the exception testing by Kupiec (1995).

Your final VaR backtesting results will look similar to

by which you are able to tell the performance of your VaR model.

certainly there isn't only one way for VaR backtesting, the above-mentioned one is an example.

Tags - var

I tested 5 strategies out of 7 for a randomly selected Chinese stock downloaded from Yahoo, since shorting selling is hard in Chinese market I exercise long strategy only (which might influence their performance, I admit). Starting with capital 12500, transaction cost 0.5% and running for one year data, the results are (pls bear with me, the graphs look ugly, just for preliminary research):

4, the %b strategy

Although all for pullbacks, 3-day high/low method did worst with only 0.01 sharpe ratio, compared with the best one the %b strategy 3.34 and buy & hold strategy 0.74. R3 strategy generates 2.67 sharpe ratio high enough for trading but we have to be very careful as the slipage cost due to whipsaw position may kill our profit.

Anyway, as the authors mentioned, we must test seriously before applying these strategies to non-ETF assets, especially for breakout type assets. Added the book to your shelf now High Probability ETF Trading: 7 Professional Strategies To Improve Your ETF Trading.

Tags - strategy , trading

The exact computational time depends on the time steps and asset steps, but generally speaking, since Quadrature has a higher order of convergency rate, it is several times faster than finite element, in my case, Quadrature costs me less than ten seconds but finite elements costs me around one minute.

PS: the y-axis should be relative error.

Tags - quadrature , convertible bond

Interested reader shall check at its website at http://www.derivativeengines.com/index-3.asp

Tags - derivative

Quotation

The aims of the Statistics Online Computational Resource (SOCR) are to design, validate and freely disseminate knowledge. Our Resource specifically provides portable online aids for probability and statistics education, technology based instruction and statistical computing. SOCR tools and resources include a repository of interactive applets, computational and graphing tools, instructional and course materials.

Quotation

The core SOCR educational and computational components include: Distributions (interactive graphs and calculators), Experiments (virtual computer-generated analogs of popular games and processes), Analyses (collection of common web-accessible tools for statistical data analysis), Games (interfaces and simulations to real-life processes), Modeler (tools for distribution, polynomial and spectral model-fitting and simulation), Graphs, Plots and Charts (comprehensive web-based tools for exploratory data analysis), Additional Tools (other statistical tools and resources), SOCR Wiki (collaborative Wiki resource), Educational Materials and Hands-on Activities (varieties of SOCR educational materials), SOCR Statistical Consulting and Statistical Computing Libraries.

As its name suggests, SOCR is mainly for people learning statistics, for example, to fit a certain probability, to draw density graph of a selected distribution, etc. There are also limited financial applications as well,

Anyway, sharing it just in case some ppl need a portal to learn statistics. http://www.socr.ucla.edu/SOCR.html

Tags - statistics

Since tһe earlү 90's when thө first practically usable types emerged,

Suмmary of operation:

* The trаder, wishіng tο quantіfy the relationship amοng a group οf stοck or share prices, and/oг indіces, enters the tickers in capital letterѕ, separated by commas.

* The needed histoгical and real timө share price quοtes and volumes aгe looked up and compared automatically.

* The neural network searches for a nonlinear mathematical relаtionship (pattern) relating thө рrices and volumөs tο the tіcker of interest, while thө υser participates by сontrollin# rөlating the priсes аnd volumes to the ticker οf interest, while the user participates by controlling а sensitivitү (also called 'мomentum') adjustment

* When sensitiνity iѕ tһen set to zero, graрhs shοw two yөars οf correct and rigorous backtesting. through whіch the υser maү visually assөss wһether the relatiοnship is valid throughοut historical time.

* The relationshiр іs extended intο the future to мake a forecast, by tһe nuмber of days the υser hаs set on thө slider during training.

* There is no buy/sell indicator: the reliability of the forecast depends on thө user'ѕ visual verification οf tһe matсh between the tωo grаphs oЬtained during backtesting, and the his estimation of the likelihood that tһe mathematical relationship which has bөen found will continue to hold in the future.

Downloading or trying online through http://www.goldengem.co.uk/ or the one I introduced before http://www.mathfinance.cn/neural-network-source-code/

Tags - neural-network

A snapshot looks like

To install the application, just search "

Tags - calculator , gphone

one independent variable only

two states only

arbitrary number of observed variables may be included to explain time-varying transition probablities or state-dependent means

external c-code, analytical gradients and combined maxlik()/EM algorithms for fast calculation

descriptive statistics, plots and White's model-misspecification tests

cascading estimation

separate, faster code for "simple switching" models (i.i.d. mixtures of regimes.)

learn more and download at http://www.hec.ca/pages/simon.van-norden/codepage.html and a Guide to the Bank of Canada Gauss Procedures at http://papers.ssrn.com/sol3/papers.cfm?abstract_id=50565.

Tags - regime , switch

QAM is the Gauss library which has been developped for the lecture notes on Quantitative Asset Management.

This library contains procedures:

for computing backtest (monthly rebalancing, currency hedging, strategy leveraging, fees managing, performance reporting, etc.).

for portfolio allocation (Black-Litterman, Markowitz, ERC, MDP, risk Bbdgeting, index sampling, 130/30, MSR, Sharpe style analysis, etc.).

for computing numerical algorithms (simplex set, Markov generator, quadrature rules, Fokker-Planck equation, etc.).

for derivatives pricing (dynamic delta hedging, Hedge fund replication, etc.).

for statistical methods (Artificial neural networks, copula, CSS, FLS, GMM, Huber, LAD, Logit, MARS, ML, NLS, PCA, Probit, Quantile regression, QP, Robust, Non-parametric Kernel regression, RBS, Tobit, factor models, etc.).

for time series analysis (arch, garch, vecm, spectral analysis, wavelets, etc.)

for strategy backtesting (covered call, bull-spread, carry trade, variance swaps, vix, long/short equity, absolute return strategy, trend-following strategy, etc.);

for stock screening (gini optimization, scoring methods, boosting, baging method, etc.)

for risk management (stop loss strategy, take profit strategy, concentration, etc.)

Please download the manual, library and lecture notes (in French only, unfortunately) at the author's webpage.

Tags - library , quantitative

Taking an up barrier

tau := t − sup {s <= t|S(s)<= L}

with up barrier L, tau measures the difference between the current time t and the last time the stock price S below L, the call feature is activated only if tau>= D, with D being barrier window.

Interested reader shall download a

Tags - parisian , option

Quotation

Can price any combination of:

Calls or Puts

European or American style

Option value or Implied volatility.

To download, either search "

Tags - gphone , calculator , binary , option

Yesterday I downloaded a free application named

Although the supported options are limited, it is fun to play a derivative calculator wherever as you go, isn't it? the code is written in Java that I am not familiar with, but have downloaded The Android SDK for developers to see if I am able to build an application covering more options like Matlab-GUI equity derivative calculator does.

if you happen to own a Gphone, this option pricer can be found by typing "

Publisher's blog: http://jwdevg1.blogspot.com/

Tags - calculator , gphone , option

Although I try best to check each file before recommendation, downloading and using are at your own risk. Should you are interested and would like to track my latest collection, please visit my blog or follow my twitter at http://www.twitter.com/a_biao.

You can distribute this list as you want, the only wish from me is please ’do not change the sentences’ and leave the original links when you want to post somewhere, thank you.

Downloading the PDF file at: http://www.mathfinance.cn/attachment/QuantitativeFinanceCollector.pdf (right click and save as)

Tags - blog

Quotation

The ISDA **CDS Standard Model **

The ISDA CDS Standard Model is a source code for CDS calculations and can be downloaded freely through this website. The source code is copyright of ISDA and available under an Open Source license.

Background

As the CDS market evolves to trade single name contracts with a fixed coupon and upfront payment, it is critical for CDS investors to match the upfront payment amounts and to be able to translate upfront quotations to spread quotations and vice versa in a standardized manner. Implementing the ISDA CDS Standard Model and using the agreed standard input parameters will allow CDS market participants to tie out calculations and thus improve consistency and reduce operational differences downstream.

The ISDA CDS Standard Model is a source code for CDS calculations and can be downloaded freely through this website. The source code is copyright of ISDA and available under an Open Source license.

Background

As the CDS market evolves to trade single name contracts with a fixed coupon and upfront payment, it is critical for CDS investors to match the upfront payment amounts and to be able to translate upfront quotations to spread quotations and vice versa in a standardized manner. Implementing the ISDA CDS Standard Model and using the agreed standard input parameters will allow CDS market participants to tie out calculations and thus improve consistency and reduce operational differences downstream.

Besides the code for CDS, a Yield Curve Specifications PDF file about how the yield curve is constructed and calculated is also available at the webpage, enjoy!

http://www.cdsmodel.com/

Tags - cds , credit

time. The aim of this paper is to present a framework to model the implied volatility

of the FTSE options in real time, and to present a prototype application that

implements this framework. The authors adapt the parametric models presented in Dumas et

al (1998) to estimate the surfaces across moneyness instead of across strikes, they

discuss how this framework can be used in applications of option pricing and risk

management.

Paper and attached matlab/VB/mathematica codes: http://www.amadeo.name/working_papers/volatility_surface_may04.pdf

Tags - volatility , surface , smile

Automatic Testing is made simple and quick through the use of unit testing frameworks, the most popular amongst these is xUnit which has implementations in most modern programming languages. For Matlab we have a version of mlUnit available for your use. In python, pyUnit is part of the standard library and is available as a standard package unittest. For R there is RUnit.

Main Benefits:

much less time spent chasing bugs and debugging;

higher quality of code and software;

provides documentation of which functionality has been tested;

greater confidence to make changes to existing code since unit tests will catch incompatibilities early.

Sounds nice? Downloading packages at:

http://mlunit.dohmke.de/Main_Page for Matlab

http://docs.python.org/library/unittest.html for Python

http://cran.r-project.org/web/packages/RUnit/index.html for R.

Tags - code , test

Tags - copula

* Flexible models with stochastic volatility and stock price jumps

* Option prices with Greeks (sensitivity to parameters)

* Realistic Smile charts

* Fast evaluations

* Self-validating results. (You validate calculations by selecting a different numerical method: Lattice, Series, or Monte Carlo)

The program is a downloadable executable for MS Windows systems: http://www.optioncity.net/calculator.htm

Tags - calculator , option

UNIFORM is a Mathematica library which return a sequence of uniformly distributed pseudorandom numbers.

The fundamental underlying random number generator in UNIFORM is based on a simple, old, and limited linear congruential random number generator originally used in the IBM System 360.

For detail and several language version pls click http://people.scs.fsu.edu/~burkardt/math_src/uniform/uniform.html.

Tags - simulation , monte carlo

Bond Price Volatility: duration(s), convexity, immunization;

Term Structure: yield curve, spot rate, forward rate, term structure theories

Option Pricing: Black-Scholes, binomial, European, American

Numerical Greeks (& Some Latin): delta, gamma, vega, theta

Option Applications & Exotic Options: Corporate securities, barrier, Asian, lookback,

futures, forward, futures option, swap

Monte Carlo & Quasi-random: variance reduction, Brownian bridge, Halton-, Sobel-, Faure-sequences

GARCH option pricing model:multinomial tree, Monte Carlo

Interest Rate Models: lognormal, Vasicek, CIR, BDT, Hull-White, HJM

Mortgage-backed Securities: prepayment, PSA, CPR, SMM, pass-through, CMO, stripped MBS, ARM, prepayment model, seq. CMO, PO/IO, PAC, option-adjusted spread, cash flow, duration

convertible bond, callable & put bond, option-adjusted spread

...

http://www.csie.ntu.edu.tw/~lyuu/Capitals/capitals.htm

Tags - calculator , derivative

Tags - covariance

http://www.finmath.cn/

http://www.rseek.org/

Software documentation

For a fantabulous reference on derivative pricing, confer with Espen Gaarder Haug (1998) Option Pricing Formulas, McGraw-Hill. The routines were all deduced from the pseudocode there.

http://www.kmri.com/software/popp.html

Tags - perl , option

2 – Data Management

3 – Financial Modeling(Important PROCs and Advanced PROCs: IML, SQL)

4 – Advanced Techniques (SAS Macro and other programming techniques)

http://faculty.haas.berkeley.edu/peliu/computing/

Tags - sas , finance