This action might not be possible to undo. Are you sure you want to continue?

abiao

Published: 2010 Categories(s): Non-Fiction, Business & economics, Finance Tag(s): "quantitative finance" "financial engineering" "mathematical finance" quant "quantitative trading"

Please read update at http:://www.mathfinance.cn

1

Quantitative Finance Collector is simply a record of my financial engineering learning journey as a master in quantitative finance, a PhD candidate in finance and a Quantitative researcher. It is mainly about Quantitative finance codes, methods in mathematical finance focusing on derivative pricing, quantitative trading and quantitative risk management, with most of the entries written at university.

Please read update at http:://www.mathfinance.cn

2

www.feedbooks.com Food for the mind

Please read update at http:://www.mathfinance.cn

3

Quantitative Finance Collector

Updated: 8-10 Update this newspaper

Please read update at http:://www.mathfinance.cn

1

**Quantitative Finance Collector
**

Handling Large CSV Files in R

A follow-up of my previous post Excellent Free CSV Splitter. I asked a question at LinkedIn about how to handle large CSV files in R / Matlab. Specifically, Quotation suppose I have a large CSV file with over 30 million number of rows, both Matlab / R lacks memory when importing the data. Could you share your way to handle this issue? what I am thinking is: a) split the file into several pieces (free, straightforward but hard to maintain); b) use MS SQL/MySQL (have to learn it, MS SQL isn't free, not straightforward).

A useful summary of suggested solution: 1, 1) import the large file via "scan" in R; 2) convert to a data.frame --> to keep data formats 3) use cast --> to group data in the most "square" format as possible, this step involves the Reshape package, a very good one. 2, use the bigmemory package to load the data, so in my case, using read.big.matrix() instead of read.table(). There are several other interesting functions in this package, such as mwhich() replacing which() for memory consideration, foreach() instead of for(), etc. How large can this package handle? I don't know, the authors successfully load a CSV with size as large as 11GB. 3, switch to a 64 bit version of R with enough memory and preferably on linux. I can't test this solution at my office due to administration constraint, although it is doable, as mentioned in R help document, Quotation 64-bit versions of Windows run 32-bit executables under the WOW (Windows on Windows) subsystem: they run in almost exactly the same way as on a 32-bit version of Windows, except that the address limit for the R process is 4GB (rather than 2GB or perhaps 3GB)....The

Please read update at http:://www.mathfinance.cn

2

disadvantages are that all the pointers are 8 rather than 4 bytes and so small objects are larger and more data has to be moved around, and that far less external software is available for 64-bit versions of the OS.

Search & trial. Tags - r , csv

Please read update at http:://www.mathfinance.cn

3

**Excellent Free CSV Splitter
**

Share an excellent free CSV splitter I found recently, as my csv file is too large to be openned in Matlab & R, I have to split the csv into several smaller files. As far as I have tried, Matlab & R warn "short of memory" for reading csv file larger than 10,000,000 number of rows (it may be varied across computers), while my tick-by-tick corporate bond data has nearly 30,000,000 number of rows. This CSV splitter allows you to split your large file into several smaller files either by number of lines or by max pieces,

The amazing point of it is the smaller files keep the original header of the big csv file, very cool. Download the free csv splitter here. Tags - csv , tool

Please read update at http:://www.mathfinance.cn

4

**Isin Cusip Conversion
**

Long time no blog. Just to let you know I am still alive, busy with my own PhD research, collecting & cleaning data, programming, making my hands dirty... Data massaging is not fun, what makes us more upset is different data providers have their own data format, name, code, etc., matching the data from several sources is not so easy, for example, WRDS includes CUSIP code while Datastream provides ISIN. I didn't understand why they do business like that but now I get it, similar as those cell phone manufacturers have distinct chargers and plug-in, not because it's hard to standardize, but a way to impose customers to use always their own products. Anyway, you can convert ISIN code to CUSIP easily once you understand the rule, ISIN is a 12-digit number while CUSIP is a 9-digit one (at least the case for US corporate bond), so what you need to do is to first strip off the first 2 characters representing country code and then remove the last digit which is a check digit for catching error. Suppose your ISIN code is in cell A1, ISIN CUSIP conversion can be done easily in Excel as "=left(right(A1, 10), 9)", for instance, ISIN US885797AB65 equals CUSIP 885797AB6. As always, I have been looking for guest writers. Tags - isin , cusip

Please read update at http:://www.mathfinance.cn

5

**Investment banks and the World Cup
**

This is a news tip that might be of interest sent by Anthony Goldbloom, thanks. In the lead-up to the world cup, Kaggle invited statisticians and data miners to take on the big investment banks in predicting the outcome of the World Cup. Now that the final has been decided, we can take a look at how Kagglers stacked up against the quants at JP Morgan, Goldman Sachs, UBS and Danske Bank in forecasting the World Cup. In total, 65 teams participated in the Take on the Quants challenge. JP Morgan finished 28th, Goldman Sachs 33rd, UBS 55th and Danske Bank 64th. The betting markets fared better, finishing 16th. The winner of the competition was Thomas Mahony, an Australian economist. His approach relied on Elo ratings with an adjustment for home country/continent advantage. His strategy correctly tipped Spain to win, the Netherlands to finish second and Germany to finish in the top four. The investment banks all had their top picks bow out early (UBS, Goldman Sachs and Danske Bank picked Brazil and JP Morgan picked England), hurting their overall performance. The next big question is whether Kagglers can also outperform the quants in forecasting financial markets (we won’t have to wait long to find out, as Kaggle is currently hosting a competition to predict stock price movements). Tags - quant , world-cup

Please read update at http:://www.mathfinance.cn

6

com'). that's it. and as a result. for example send_text_message('079-123-456'.Send SMS in Matlab Ros is a colleague of mine in the same office. you may notice the Please read update at http:://www. 'Desk 12 Calculation Done'. the email will be delivered as an SMS to your mobile.'@x-onsms. he often use several computers on different desks to run his matlab codes. So what you need to do is to put the function send_text_message at the end of your file. it should be enough for our use in Matlab. I came across SMS service website which allows people to send up to 3 free email to SMS per day. bascially what it does is to send email via sendmail function of Matlab from your gmail box to your cell phone carrier. it works for US based cell phones only. emailto = strcat(number. his main research is empirical analysis of different option pricing models. It sounds boring. which is time-consuming and not rare to last 2 or 3 days. So he has to come back office frequently to check which computer has finished the task. it will then send you a message automatically. Problem However.mathfinance. Add the following line in the switch case after line 55 case 'uk'. Possible error Depends on your Matlab version and firewall setting. Solution Fortunately. and then your cell phone carrier forwards the email to you as a text message.'Now you can shut down the computer') What else can it be used? stock price alert? profit threshold alarm? you name it.'UK'.cn 7 . why not write a small script to send SMS message to you automatically when your matlab stops running? Send Text Message to Cell Phone is such a great file I found recently. I have tried on my UK T-mobile phone and it seems UK T-mobile doesn't support such a mail to SMS service (correct me if I am wrong). Do let me know if you are aware of a better alternative.

following errors: 1. What you shall do is too add an exception and let your computer know this action is safe.gmail. save it.com. done. port: 25. Connection timed out: connect This is due to your firewall or anti-virus software setting. ??? Error using ==> sendmail 530 5.exe as a process to be excluded. you are not allowed to send email from port 25.0 Must issue a STARTTLS command first This could happen for MATLAB 7. I have McAfee.7. Tags . don't forget to change the email address and password at the beginning of the file.cn 8 .matlab .1 (R14SP3) and before. to add an exception.mathfinance. 2. open its control console -> double click access protection -> anti-virus standard protection -> prevent mass mailing worms from sending mails -> Edit add Matlab. you may have to upgrade your version.com/matlabcentral/ fileexchange/16649. sms Please read update at http:://www. For instance. Could not connect to SMTP host: smtp. Ros. you don't have to check computers one by one. Sounds useful? download the file at http://www.mathworks.

r Please read update at http:://www.) FormatR is the package for tidying R source code. although it is less convenient to use than the straightforward shortcuts in Matlab. (It is an absolute advantage of Matlab. however. Before: After: Download the package at http://cran. what is it for? as the title suggest: Quotation formatR: format R code automatically. farewell to ugly R code Below is a comparison before and after using FormatR.cn 9 . and luckily found it today. ctrl+R for comment. mainly due to the lack of format shortcut.r-project. etc. R programming is unfriendly as far as I concern. ctrl+I for smart indent.mathfinance. Unquestionable R is powerful.org/web/packages/ formatR/index.Excellent R Code Format Package I have been looking for this type of package for several days. this package is good enough for me. for example.html Tags . ctrl+T for uncomment. which makes the R codes rather ugly.

function (s. EuropeanOption <. to be honest. how are you going to start? Show him your hundreads of lines code. For a simple example. generating GUI is by no means easy as I know the pain when creating the Matlab-GUI equity derivative calculator. One line code is enough. explain what the arguments and outputs are? No. r.(log(s/k)+(r+0. It becomes even worse in R language. it is not a smart way since you are supposed to introduce in a few short sentences. t. Luckily I came across a good R GUI package named "fgui"."FALSE"))) Please read update at http:://www. especially when what you need is just a basic GUI demonstrating to others a rough idea. vol. However. Very nice indeed. I create a European option pricer with Black Scholes formula.d1-vol*sqrt(t) if (CallOption){ return (s*pnorm(d1)-k*exp(-r*t)*pnorm(d2)) } else { return (k*exp(-r*t)*pnorm(-d2)-s*pnorm(-d1)) } } then generating a GUI for this function is as simple as adding the following code res <gui(EuropeanOption. I hate the graph plotting in R. argOption=list(CallOption=c("TRUE". CallOption) { d1 <. terribly unflexible compared with in Matlab.cn 10 . after playing for half an hour.Simple Dummy R GUI Generator Imagine you finish a dirty coding project and want to present to your boss who is not in a good mood (may not be occasionally). so in a same logic.5*vol^2)*t)/(vol*sqrt(t)) d2 <. point to the lines. Generating a GUI is probably the quickest / easiest way of understanding what this code does. a GUI is worth n thousand words. k. it is simple to use. As the old saying goes: a picture is worth a thousand words. it does as its description: Rapidly create a GUI interface for a function you created by automatically creating widgets for arguments of the function.mathfinance.

org/web/packages/fgui/index.mathfinance.It returns a GUI looks like where you are able to set inputs and get outputs. Interested readers shall download the package "fgui" at http://cran.rproject.html Tags .cn 11 . More advanced GUI is possible by adding more lines. Nice. gui Please read update at http:://www.r .

economic data.cn 12 . The 2010 INFORMS Data Mining Contest takes aim at this goal. Knowing whether a stock will increase or decrease allows traders to make better investment decisions. good predictive models allow traders to better understand what drives stock prices. Moreover. The results of this contest could have a big impact on the finance industry. competition Please read update at http:://www.prediction . Participants will submit their predictions for the test database (which doesn't include the variable being predicted). sectoral data. Quotation Competitors will be provided with intraday trading data showing stock price movements at five minute intervals. The winners of this contest will be honoured at a session of the INFORMS Annual Meeting in Austin-Texas (November 7-10). Final results will be announced on October 12th. supporting better risk management. investors and hedge funds are always looking for techniques to better predict stock price movements. requiring participants to build models that predict the movement of stock prices over the next 60 minutes. analysts. experts' predictions and indices. The submission deadline is October 10th 2010.Short Term Stock Price Movement Prediction Competition Many thanks to Anthony who emailed me the link to this competition.com/informs2010 Tags . So you are a quant-gambler? time to stand out! Traders. We have provided a training database to allow participants to build their predictive models. The public leaderboard will be calculated based on 10 per cent of the test dataset. Check the detail of this competition at http://kaggle.mathfinance.

debug Please read update at http:://www.Debugging Your Thinking Quotation Writing program code is a good way of debugging your thinking .pdf. Enjoy.cn 13 . Here is an introductory video demonstrating how to debug and understand Matlab codes: Also a very good PDF document for debugging in R with detailed examples at http://www.edu/~rpeng/docs/R-debugtools. Tags .jhsph. When it comes to Matlab and R. shorten working hour. A good debug tool. I have to say the debugging in Matlab is straightforward but is more comprehensive in R.Bill Venables Believe it or not.mathfinance.biostat. and enjoy more the world cup. on average programmers spend 70% of their working time in debugging (I don't know where this number is from but I do believe so). command or even habit will definitely improve your work efficiency.

but for the purpose of introduction. Some scalpers may open and close as many as several hundred trades within a single trading day. this can eliminate any real security. scalpers must find forex brokers with low transaction costs and fees. scalping is the method with the shortest trading periods. this limited exposure leads to a second major characteristic of scalping—a large number of trades. and many traders argue that this limits their exposure to the market. If you decide to use this strategy. expect it to dominate your time and efforts for as long as you are trading. make sure that your broker’s commission structure allows for you to be profitable. With this method. Before considering this style. Scalping has a far shorter time frame than the other forex methods. A fourth characteristic of scalping is that it is generally a full-time endeavor. The profit from each trade is generally quite small. Scalping requires constant and undivided attention.Forex Market Strategy Guide: Scalping 101 There are multiple ways of profiting in forex.cn 14 . including swing trading or trend following. Many of these considerations will then serve as the topics of further articles.mathfinance. Since the number of trades is extraordinarily high. Depending on the amount of leverage you use. the results would hardly be worthy of the effort. This series of articles will serve as a guide for scalping. A third characteristic is the fact that scalpers rely on some type of leverage. The idea is to benefit from short fluctuations in the market. In spite of their arguments to the contrary. This is a significant limitation. or 5 minutes at the very most. traders usually open a trade for 1-2 minutes. It is generally best to set aside an extended period of time and eliminate Please read update at http:://www. since the majority of forex traders only do it in order to supplement their income. Of course. However. we can ask what makes this strategy popular and effective. scalpers can lose a day’s work in a few bad transactions. This points to one of the major challenges for this style of trading. and even with a huge number of orders. The first major reason for scalping is perceived safety.

Unfortunately. This is unworkable for many traders.cn 15 . In recent years. During that time. this strategy works on the basis of careful analysis and timing. his exposure is finished as well. scalping is a great way to enter the forex markets. But what guides the choice to enter or exit? Actually. What does a scalping strategy look like in daily practice? We already mentioned that scalping involves entering and exiting the market in short time spans. After several months of practice. In this limited role. take profit and other orders. a news shock or some other factor might suddenly increase demand for the yen. Unfortunately. This guide will tell you some of the main things you need to know when getting started. risk accompanies any genuine financial opportunity. The strategy works when traders can find short-term disruptions in liquidity. Scalping is a workable strategy if you know what you are doing and are willing to dedicate your full time energy to forex trading. most of these are unproven.mathfinance. there will be a need for liquidity as too many people demand the yen with insufficient supply. you might use software to execute redundant tasks like stop-loss. and many make wild claims that stretch far beyond plausibility. The first step in any guide on scalping is understanding how scalpers actually make money. As any experienced investor knows. and with plenty of education. or fundamental analysis. while doing the analytical tasks yourself. though when a scalper finishes for the day. A scalper might recognize that the Please read update at http:://www. For instance. Some scalpers try to eliminate this problem by automating the process. The spread between bid and asking price will temporarily widen. a vast number of robots and software automation kits have become available for scalpers. the automation can be a significant help by allowing you to execute more trades with less drudgery. there is a real benefit in automating certain parts of the process. or other temporary abnormalities. ranging. For instance.any other distractions. What makes scalping different from other strategies is that it takes advantage of volatility rather than trending. scalpers try to identify small patterns and exploit them. Still. Recognizing that the market moves erratically in the short term. too many beginners try scalping based on the assumption that they can avoid risk.

but the important thing to remember is the short duration that scalpers use. It’s not hard to see that after a major event. Scalping is an interesting strategy because it takes advantage of Please read update at http:://www. This means that scalpers actually benefit from volatility by trading on the assumption that prices will stabilize again.mathfinance. it will be closed in a matter of minutes or even less when the stop-loss level is reached. scalpers act as “brakes” on the micro-volatility of the market. and collect on the difference. stable viewpoint and profits from those who don’t. One other implication is that the most important time for a scalper is just after a market shock. prices routinely zigzag for several minutes before settling again. all the way up to 50:1. These kinds of leverage would be simply intolerable for other traders.liquidity has to return eventually and the price will eventually settle back into normal levels. The inherent limitation of trading on micro-volatility is that it will never be very significant. But these observations lead to the other major topic of this article—leverage.cn 16 . Since this is an emotional over-reaction. and losses can multiply exponentially. scalpers use surprising amounts of leverage to make their trading more potent. it is always wise to use caution and trade with lower amounts of leverage. Significant news shocks might cause very wide spreads in a short time. During this time. Therefore. he can go long or short. In such cases. It is also crucial to always use a good stop-loss mechanism and not adjust it for individual trades. a scalper maintains a realistic. Based on this. there is little opportunity for wide swings in the market that would risk massive losses. If these measures are maintained and a trade turns out badly. They actually profit by dragging irrational price-spikes back to meaningful levels. Their leverage might range from 5:1. It’s also easy to see that if trading wisely. There are still a few cases when scalpers might still suffer significant losses. Even the best brokers may not be able to complete stop-loss orders quickly enough. traders should always be conscious of whether new economic data or another type of event has the potential to cause significant disruptions. Scalpers pay careful attention to announcements of economic data or news shocks and the disruption that follows. Therefore. as appropriate.

you simply have no chance of success. Receiving large numbers of orders every day doesn’t make this easy. a brokerage may even have a stated policy against scalping. Since the cost of the spread applies to every trade whether it is profitable or not. Therefore. For instance. you should also check for any commissions or hidden trading fees. In addition. imagine that a trader makes 50 trades with a nice profit of 130 pips. The conclusion is fairly obvious—if you want to make any profit with scalping. If you work out the math. Without the right platform and broker.phenomena that might otherwise seem random. a spread of several pips is hardly an issue. you must also find a broker with the most up-to-date technology and a toleration for large numbers of orders. For those reasons. but scalpers might open and close more than a hundred daily. the same principle applies—profit belongs to the traders that use their heads and who are not carried away by short-term emotion. But what should you be looking for? The first issue is the broker’s spreads. this loss adds up very quickly. and where do you start? One of the most important foundational issues is choosing the right broker. If the spread is three pips. It is a simple testimony to the fact that on every level of the forex market. The scalpers that succeed are the ones that have mastered that art.mathfinance.cn 17 . what do you need to make it work. Unfortunately. But this search is not always easy. Sometimes this is a stated policy. In some cases. Look for a fullyautomated broker with no-dealing desk (NDD). every broker has to countertrade the orders he processes to avoid being financially liable. When it comes right down to the pragmatics of this strategy. this is a significant loss. Please read update at http:://www. you’ll need to find a broker with the lowest spread possible. In addition to spreads. many brokers have a bad relationship with scalpers. The next logical question in our guide to scalping is how to do it. If a swing trader opens and closes several positions every day. but very often a broker will simply terminate a scalpers account or slow down his processes so that scalping is impossible. The problem is that the number of trades scalpers make can sometimes overwhelm older systems. many brokers try to eliminate scalpers. he would end up with a net loss of 20 pips.

cn 18 . price quotes must always be precise and updated dynamically.mathfinance. you should also be confident that your broker isn’t fraudulent. there are several other things you should know about scalping. Be upfront from the beginning with your broker.There are several other things that can make scalping impossible. Even major events will not produce significant jumps in these pairs. In short. But in particular. All of these currencies change very slowly. and move to riskier pairs as you become more experienced. Once you establish a broker. and many traders report eye-strain after a long day of staring intensely at a screen. Therefore. Even a small delay (latency) makes trading based on micro-volatility impossible. because of the volume that is regularly traded. If the trades take too long to process (slippage). Scalping requires intense focus. this should include the same financial tools that trader’s want with other strategies. such as GBP/USD. Please read update at http:://www. Similarly. you should never try to use scalping through a broker with wide spreads or other excess costs. you should always look for efficient execution of your orders. Of course. scalpers should look for platforms with a workable interface. If you try to use this strategy through a system that can’t handle it. and done through the right avenues. Customization is also a big advantage. Finally. the brokerage will intentionally make trading impossible. Done right. you should wisely pick currency pairs that will work well with the strategy. scalping can be quite successful. You should also pay attention to the visual appearance of the interface. The best thing is to start out with the basic pairs. Most of all. you should consider every angle before committing yourself to a particular brokerage or a trading platform. USD/CHF and others currencies from the major world economies. This is important because of the number of rapid orders that must be made. For the most part. you should look for an interface with a full range of execution tools. The most stable and liquid currency pair is certainly EUR/USD. however. Of course. First. the price difference will quickly make trading unprofitable. Other majors have a similar stability. as well as automation. The net result will always be a loss. the interface needs to be fast and easy to use.

your preference for each of these times depends on your style. Trading with one of these is a significant risk. Early afternoon tends to be quite choppy. scalpers should look for shorter trades without concern for directionality. Many announcements also direct the market during this time. The advantage of the more stable currencies. during the time that the markets are open. In choppy conditions. exotic pairs involve small or developing nations with a low volume of trade. with higher risks but potentially greater profits. the Turkish Lira (TRY). Examples might include the Norwegian Krone (NOK). and the market becomes its quietest. it is generally best for beginners to stay away from pairs that involve the Yen (JPY) or other carry pairs.mathfinance. Finally. but also great liquidity. So when is the best time to trade? From 7:00-8:00 (EST). the Brazilian Real (BRL). and often run into significant liquidity problems. excessive volatility can be quite unpredictable. Of course. Any experience trader also realizes that the markets change during the course of a day. there should be more attention to larger trends. Late morning brings higher volatility. markets are quite choppy. but much more volatile than the majors. and the Please read update at http:://www. One of the results is that market shocks will have extreme results that might result in very wide spreads. This means that a trader can generate very large returns from these pairs. is that directional changes are much easier to predict. Really. A good example here is the Japanese Yen. if he is willing to accept the risk. These currencies are liquid. because worldwide traders anticipate the opening of the New York market.cn 19 .But isn’t the goal of scalping to profit from volatility? So it seems as though more volatile currencies would be better. or any of the developing currencies. Late afternoon sees the closing of most large banks in developed countries. this might result in extreme losses that a stop-loss order cannot protect from. Another group can be called carry pairs. Furthermore. Interest rates are very high on the Yen. Remember that even small fluctuations can be magnified through leverage. Therefore. and many investors also use the currency for risky assets. These pairs are quite unpredictable. Within a scalping strategy.

Please read update at http:://www. For instance. but on a much smaller scale. you can consider taking bigger risks. we discussed how scalpers profit and how they use leverage.possibility of more extended trades.cn 20 . if a scalper opens a position and then observes a longer profitable trend. Trend scalpers follow the direction of the market and try to profit from where it is headed. Depending on what is happening. Traders might use any one out of a number of techniques to make their strategy successful. There is a deeply psychological aspect of dealing with risk and loss that every trader should be conscious of. including a good broker and an efficient platform. or form his own hybrid. At times the distinction between scalping and other strategies is quite unclear. Risk may be just the thing if you know how to handle it. All of these factors are significantly influenced by your particular style and your experience.mathfinance. it only makes sense to take full advantage of it. Learn how to predict the market with low leverage and minimal risk. If you’re only beginning. we discussed the best currency pairs and times of day when scalping works best. However. the key is to stay with major pairs and avoid times of wild fluctuations. After a brief introduction into the characteristics of scalping. Once you’ve seen and handled various market conditions. a trader might switch back and forth between all of the strategies. but profit in the time just afterward. The more important point to recognize is that scalping varies drastically according to conditions. this points to a very important issue that applies to all forex trading. and pursuing larger profits. This guide has sought to introduce scalping and discuss the pros and cons of the strategy. We also pointed out the major necessary things to make scalping successful. and experienced traders often had straight for more volatile times and currency pairs. Finally. These traders stay away from the period closest to the news event. Here are a few qualities to aim for. But this guide runs the risk of being overly simplistic if we fail to talk about the variations on scalping. Other scalpers prefer to take advantage of news events and other shocks to the market. Think of this as following the macro-direction of a currency.

trading . Know what style works well for you. A second. Some scalpers suffer losses at the beginning. you must be patient for the long-term. This is the only problem with moving between various strategies—it becomes too easy to make emotional decisions and take foolish risks. strategy Please read update at http:://www. However. don’t make the mistake of varying the size of your trades too much—especially when you have a string of successes.cn 21 . you should jump into the market fully. remember your strategy and follow it assiduously. this method can be one of the most profitable forex strategies. it is easy to be controlled by the volatility and make foolish mistakes. Be willing to wait for that. Scalping works when lots of small but profitable trades add up to a large sum. In particular. education. and the right tools. even if it requires persistence and temporary loss. At those times. but with a lot of practice. must exercise discipline in their trading.forex . One bad trade can erase a lot of progress. scalping is actually one of the most challenging strategies. Observe what market conditions tend to reap the best profits for your trading. When markets become chaotic. When you recognize that conditions mirror what has worked well for your strategy in the past. it may be best not to trade at all. Let your strategy control your decisions.First. Beginning traders sometimes assume that scalping is the easiest way to earn a quick profit. related point is cool-headed thinking. discipline. it is imperative to know yourself. Tags .mathfinance. scalpers and all forex traders for that matter. Finally. Third. At certain times.

besides what we normally need for closing price.Excellent Yahoo Finance Data Downloader Although I have shared several ways to download data from Yahoo Finance.gummy-stuff. yahoo Please read update at http:://www.cn 22 . Yahoo chinese historical stock data. I have to admit the one I recommend today is the best and most comprehensive ever. download option price data from Yahoo.htm Tags . It supports dozens of tags to download.org/Yahoo-data. for instance.data . volumn. daily high. including (click the graph to see a clearer picture): Massive. and daily low. isn't it? download the csv file and also a file for option data at http://www.mathfinance.

working on it. however.sapply(1:10. instead of: for (i in 1:10) { z[i] <.mean(x[1:i]) } we could use z <. it can be done by passing z itself to sapply.R Sapply Problem Any expert in R please educates me. but what if besides computing z. How to vectorize that and use sapply then? since sapply can't return two variables z and temp.. x) {mean(x[1:i])}. ah.mean(x[1:i]) temp <. failed. Please read update at http:://www. I have got a problem about the sapply (or lapply). with loop. function(i. for example. I tried to define a matrix and store z in the first column and temp in the second column and return the matrix. it is temp <. it made me headache for over two hours. for example. still not correct. sapply is designed for this..x[i]-temp z[i] <. As "for loop" is very slow in R.cn 23 . PS. I need to update another variable. I worked it out. NO. we should try best to avoid using it.x[i]-z[i] } in this case.3 for (i in 1:10) { x[i] <. and to use vectorization instead. Many thanks.mathfinance. that's good. x) It went well. temp is changing every step (it doesn't have to be a function of z[i]).

sapply[1] <.x[((i+1)/2)]-z.for <.2*nsim.mean(x[1:i]) temp <.sapply[i] <.sapply[i:(i+1)] }.list() z.temp z.for z. z.r Please read update at http:://www.temp <. function(i.sapply[seq(2.sapply <.array(0.sapply[i+1] <.rnorm(nsim) y <.z.for[i] } y$z.cn 24 .3 for (i in 1:nsim) { x[i] <. by=2)] y } Tags .mean(x[1:((i+1)/2)]) temp <.2*nsim) z.z.for <.sapply(seq(1.sapply.2*nsim.function(nsim = 10){ x <.sapply) { temp <.temp z.3 z.x[i]-z.for[i] <.x.sapply <.array(0.z.mathfinance.z. nsim) temp <.z.the following is a sapply example returning the same result for "for loop" and "sapply". x.sapply <.temp z.sapply[i] z. sapply. simplify =TRUE) y$z.x[i]-temp z.example <.by=2).

1) but in R we use a[1. etc.3. fantastic! http://www. It does bring me trouble sometimes. very convenient indeed. in Matlab we use a(1. it lists those widely used commands in R and corresponding commands in Matlab.math.R for Matlab Users My favorite software is Matlab. more and more people & companies choose to use R as a major working language. matlab Please read update at http:://www.html PS: Walking Randomly suggests another excellent PDF manual consisting of 47 pages.cn 25 .net/octaver. (I am always wondering why they can't be designed in a similar way). Search before trial & error: http://mathesaurus.1]. for example.mathfinance.pdf Tags .umaine. luckily I came across a web page similar as cheat-sheets. Nothing wrong with that. I am at the moment changing some of my Kalman Filter Matlab codes to R.2) but in R we dont have such a command but matrix(1. in Matlab we have ones(3.r .edu/~hiebeler/comp/ matlabR.sourceforge. but partly because R is free.2). One bothering issue is each software has its own coding rules.

cn 26 . Holland.South African World Cup Today is the first day of South African world cup. Tags .football Please read update at http:://www. GO GO GO. although JP Morgan's Quant group members use their model to predict England will win this world cup Championship. enjoy football everyone. Disappointing French team. I still go for Netherlands.mathfinance. A funny graph showing the characteristic of each team.

We have a very special offer for traders today. exclusively to you. You can download it now for free here. elliott Please read update at http:://www. How to Use the Elliott Wave Principle to Improve Your Options Trading Strategies -. trading . The ebook is designed to help you exploit sharp price movement with powerful vertical spread trading strategies. 42-page ebook for options traders for free download.Exclusive Offer: Download $79-value Vertical Spreads options trading ebook for free A guest post from our Elliott.cn 27 . Tags . is available for free. The new ebook.mathfinance. Our friends at Elliott Wave International have just released their $79-value. This valuable ebook belongs in any serious trader's library. Bear Put Spread. Bull Put Ladder and more. which sells in EWI's online store for $79.option . including: Bull Call Spread. Dear reader.Vertical Spreads. Bear Call Ladder. for a limited time.

the other one is http://cran.r-project. Tags . one is http://cran. and plan to create an interest rate R package in order to make it re-usable.org/web/packages/termstrc/index.r-project.html. help me add it by leaving a comment.An Interest Rate R Package Plan I recently have done some empirical studies on zero-coupon bond modelling and pricing. both of them don't cover short interest rate model. package . unfortunately.r .org/web/packages/YieldCurve/ index.mathfinance. Below is a short plan. as I find there are only two R package on it.cn 28 .html. rate Please read update at http:://www. thanks.

2. perl –help. as R is designed in a Unix environment which includes a set of compilers. available at http://www. special attention needs to be given to the path of R software.exe to install it and its accompanying tools: minGW.aspx. Tex –help. convenient usage. For example. right click on the “My Computer” icon on your desktop. respectively. such as codes protection. double click Rtools.org/. Microsoft HTML Help Workshop and the Inno Setup installer.jrsoftware. http://msdn.murdochsutherland. choose properties and click on the “advanced” tab. To set the path. Below are the selected steps to create an R package in Windows I summarize: 1.com/en-us/library/ ms669985. You should see a list of options. Check carefully whether all the paths are correct.cn 29 . I used to build an R library in Unix and thought it was relatively as the same convenient as in Windows. double check whether all tools are installed correctly by opening a “command prompt” window and typing the following commands: R. you may download and install LaTex. Microsoft HTML Help Workshop is for making HTML Help documents. 5. Silly me. 3. otherwise re-install or check the path if you see “… is not a Please read update at http:://www.mathfinance.How to Create an R Package in Windows There are many reasons to create an R package. Rtools automatically recognizes the paths of those relevant softwares and add them to the environment variables of your computer. gcc –help. 4. etc.miktex. programming utilities. respectively. and text-formatting routines while Windows lacks those. and http://www.microsoft. check and change your PATH “environment variables” of your computer if incorrect.com/Rtools/. you have to download Rtools at http://www. it IS in Windows. However. creating an R package in Unix is not hard. click the environmental variables button. especially when your documents have math equations.org. LaTex is for a nicer outlook. perl. depending on your needs. but it turned out I had to spend several hours on it. click on the path variable and select the edit button.

tar.ethz. now you are able to install the package typing “R CMD INSTALL MonteCarloPi_1. #MonteCarloPi. I write a sample code MonteCarloPi.tar.gz”.gz”. for instance. type the command “R CMD build MonteCarloPi” to build the package.ch/R-manual/R-patched/ library/utils/html/package. we use package. This function creates the directory tree for the package containing: DESCRIPTION << man <<< for documentation R <<< for R function definitions src <<< for low-level source code (this is optional for other programming files.skeleton(name = "MonteCarloPi".html for detail.mathfinance.R -.gz. go back to step 8 if you see errors. such as your c++ codes) data <<< for package datasets (this is optional) 7. Congratulations if you see “…done…” and you will notice there is one more sub-folder “MonteCarloPi” in your R library folder. start R and run the command package. test the package by typing “R CMD check MonteCarloPi_1.R to estimate PI by Monte Carlo simulation.R”).cn 30 . otherwise you are expected to see “Error: unexpected symbol in "R CMD"”. You must run the command in a “command prompt” window instead of in R.R includes function we want to add to the package MonteCarloPi.tar.PI estimation by Monte Carlo simulation MonteCarloPi <. change the directory to where your package is.0. remove the Read-and-delete-me file and modify other files in the above directory with notepad or other tool.skeleton( ) with suitable arguments. where MonteCarloPi. 8. to add the author information and Help explanation.0. 10.skeleton. 9. this will generate a file called MonteCarloPi_1.recognized as an internal or external command …” 6.0.function(nsim){ Please read update at http:://www. For instance. open a “command prompt” window. code_files = “MonteCarloPi. read the help http://stat.

which((x^2+y^2)<=1) return ((length(inx)/nsim)*4) } Quotation Reference: http://cran.org/doc/manuals/R-exts.2*runif(nsim)-1 y <.html Tags . package Please read update at http:://www.r .2*runif(nsim)-1 inx <.cn 31 .mathfinance.x <.r-project.

you fidget. Pet Rock The Pet Rock is undeniable proof that people will buy just about anything. and technology so accommodating. you frantically search for the bathroom. But what if you’re out in public and don’t know where to find one? Poppin’ a squat it picking a dark corner isn’t always an option. Since not everyone is a genius. but the inanimate companion grossed a couple million dollars in 1975. They're the reason life has become so easy for us. It's literally a rock with googly eyes glued to it.15 Incredibly Stupid Ways People Made Their Millions A selection of stories outlining the stupid ways people made their millions. The fad only lasted for that year before dying out. equipped with breathing holes and a straw as if for a real animal. Conveniently.cn 32 . SatLav Really having to pee can be one of the most uncomfortable feelings ever. Here are 15 weird and ridiculous ideas that made people rich. proved irresistible for those wishing to give silly and ironic Christmas gifts. However. and many establishments have bathrooms restricted for employee or customer use only. anyone with a cell phone can now find the nearest public restroom just by texting a short number for a small fee. Inventions are important. The market for inventions is enormous. You can’t concentrate on anything else. many of them fall into obscurity immediately as inefficient or unimportant ideas. and hundreds of new ones are patented every day. but the Pet Rock carriers. 1. 2. Please read update at http:://www. sometimes the silly ones we might be quick to dismiss are unexpectedly more profitable than the conventional method of doing whatever it is the newfangled thing does.mathfinance.

cn 33 . Please read update at http:://www. Not only did Tew make a whopping $ 1. This was The Million Dollar Homepage. but that didn’t stop the company Doggles from doing their very best. The bridge of a dog’s nose isn’t directly between his eyes like a human. Tew bought a web domain. to Target and everything in between.100 gross from his relatively simple idea. and sold them in 100-dollar blocks. Does anyone sell them? Of course -. If you think about it.and they've made more than a million dollars off the idea. like Tenacious D. Million Dollar Homepage How much is a solitary pixel floating around in cyberspace worth? Alex Tew thought $1 per pixel was a reasonable price.Tew came up with the idea in August of 2005.000 pixels. there’s no reason that goggle s for dogs should look the same as those for humans. but he also managed to attract some big name clients. 4.000. Giving dogs goggles is about as useful as giving a goldfish a monocle and cane. They pretty much look like Seth Green’s character from Can’t Hardly Wait.mathfinance.3. looking at the photo above (and ignoring the fact that this product shouldn’t exist in the first place). Doggles Do dogs really need goggles? No. Do they want them? Probably not. every pixel bar but one had been sold.037. so this design is a little strange. At $80 a pair. laid out an area of 1. and by New Year’s Eve. Tew was just about to begin studying business at the University of Nottingham. but the idea he came up with to fund his education proved that he already possessed the sensibility of a successful businessman. Ads ranged from online casinos. Doggles is a multi million dollar company.

dirty dog smell is an awful one. the two parties pull until it snaps. it won't smell so bad.. The fact that this invention has earned over a million dollars is downright ridiculous.it doesn't cover up the poop smell. Don’t just cover the smell up like some French hooker from the 1700s. Holding each end of the tiny bone.. Amazingly. Wishbones are traditionally considered lucky. It's true that wet. Another case against Petite Armande is that dogs have an exponentially stronger sense of smell than humans do. However. The animal most likely finds it unpleasant to be sprayed with irritating odor concentrates. Here's an idea: give your dog a bath. 6. just sort of hangs on top of it like an additional layer of sense assault. Suit yourselves. considering the cavalcade of weird stuff that’s preceded it.cn 34 . at around about a dollar each. This abortion of an idea also makes its creators the a ton of money. it must be a billion times stronger for the dog.mathfinance. Lucky Wishbone Co. SantaMail Please read update at http:://www. Mungo & Maud’s Petite Amande Dog Fragrance Even more absurd than dog goggles is the concept of a dog perfume. perfumed-pup-lovers. just don’t complain when Timmy’s stuck in a well an you bloodhound Biff can’t find him because his sense of smell is masked by the wafted aroma of Lassie Chanel No. and are taken from an animal (which is typically being consumed) to break in half between two people. But how about wet and dirty mixed with floral extracts? It's like spraying air freshener in the bathroom -. this might be the silliest product yet – which is definitely saying a lot.5. doesn’t sell real wishbones. 5. It sells fake little plastic ones. If the smell is strong to us. Lucky Wishbone Co. 7. and decide which player is the ‘lucky’ one according to who has the larger portion. If the dog is clean.

8. sprung for a postal address in the North Pole. so he could pretend to be Santa. Another million-dollar idea. The notes aren’t just those ‘little Johnny had a sore throat today’ notes from mom – these are excuse notes that look as though they come from a hospital or doctors office for just $25 per note. but don’t want to waste your creativity on coming up with your own excuse? The Excused Absence Network is a service which caters to all the lying employee’s needs. Byron Reese has sent over 200. Reese writes back to the letters himself.mathfinance. Fetal Greetings Please read update at http:://www. Ho ho ho!’ but then Jessica’s parents buy her a really awesome pony with a Bose sound system and five LCD monitors? Then Santa all of a sudden seems nonexistent. One of the best ways to make money out of people has always been taking advantage of their naïveté and dreams. Excused Absence Network Are you too lazy to show up to work or school on time. this time one that depersonalizes one of the most beautiful mysteries of childhood by making it a capitalist business. meaning he's made a multi-millionaire dollar fortune.000 letters since the start of that business in 2001. and Santa’s all like ‘I think that’s a bit much to ask. this sounds quite sweet. a place he'd never been. 9. from a missed math test all the way to skipping out on your own wedding. but never reveals his true identity. At first. little Jessica. in some intangible way. pretend you are Santa Claus and charge parents 10 bucks for every letter you send to their kids.Get a postal address in the North Pole. but consider this: What if little Susie (they are always called Susie) wants a little doll which Mommy and Daddy can't afford? Is Santa going to say ‘no’? What if little Jessica (she’s rich and has a last name like DuBois or something) wants a pony. Even worse than the mall Santa who lets kids sit on his lap and drinks malt liquor in the parking lot.cn 35 . and who's more naïve than kids? Byron Reese. Well.

Big Mouth Billy Bass The Big Mouth Billy Bass was designed with the sole intention of driving people insane. The website also suggests they be used for practical jokes and Halloween displays (read: causing heart attacks). www. These two criteria make up millions of people.’ As is the case with most everything else on this list. 11. & even the expectant father with these one-of-a-kind cards. you ARE the father. The website stresses that the mannequins aren’t only good for traditional uses.cn 36 .com Mannequin Madness is a website that sells second-hand mannequins at third-hand mannequin prices.MannequinMadness.mathfinance. who are the only ones to find its autonomous song incredibly novel. Fetal Greeting saw sales being reported in the million and climbing steadily. Please read update at http:://www. It sounds almost like a scenario for Maury Povich – ‘And the card says…Bob. It's a product for old people.What is the worst way of telling someone that you're pregnant? The guys at Fetal Greeting have certainly come very close to nailing it -. The singing fish is otherwise given as an unwanted box where it sits in the box to gather dust or is put out repeatedly at the same garage sale for two months. With its success has come the delightful discovery that hacks could leave the Bass able to sing any song. and the Big Mouth Billy Bass has made millions of dollars. They boast that that have ‘the perfect body for you to buy or rent’ and the second-hand mannequin business is booming.their website suggests that you should surprise friends. there seems to be a positive correlation between the inanity of the product and it’s commercial viability. 10. family. like showing off clothes and making you feel bad about your body type.

Murder Clean Up What is an ambitious real estate flipper to do with the abandoned house whose floors have been ravaged by the waste and habitation of a feral cat community? What about the family whose estranged hoarder aunt dies Please read update at http:://www. Kyle settled with a home at 503 Main Street. Two million dollars for a website whose principle visitors are stoners and 13-year-old girls who have just learned how to use the internet. and he definite has a household -. Canada. to be honest. but he’s definitely internet-famous. One Red Paperclip Kyle McDonald may not be a household name. His story stands as an example of how you can start with absolutely nothing. sometimes nonsensical. 13.cn 37 . now a conglomerate of several extended memes. he travelled to the far reaches of Canada. Along the way. all across the US. The site was acquired a short eight months after is creation by a group of investors for a whopping $2 million. The site. met Alice Cooper and Corbin Bernsen. www. and he still lives there to this day. looks used).one that he traded his way to from a solitary red paperclip (which. Finally.com I Can Has Cheezburger? burst onto the web scene in early 2007 and elevated the already rampant LOLcat meme to new level of ubiquitousness.mathfinance. Saskatchewan. and basically had one hell of a good time. and then one day live in Canada. 14.ICanHasCheezburger. Kipling. I Can Has Cheezburger? Revenue is solely advertising-based. It only took Kyle exactly one year and fourteen trades to make his way from a twisted piece of metal to a home for his family.12. subtitles. is primarily concerned with evoking humor from photos of cats with added.

from eating herself into a corner surrounded by mountains of garbage and human waste? Advanced Bio-Treatment specializes in murder. drug lab. at least grandpa has some interesting bedtime stories for the kids. and (really nasty) waste clean-up.money Please read update at http:://www.cn 38 . 15. but ABT raked in about a million dollars during 2009 alone. And if all else fails. Eternal Reef Another death-related business is Eternal Reefs. or attach a flag or sorts as a means of marking their reef. It sounds like a morbid idea for money making. Eternal Reefs have a profit of about half a million per year. a service which provides underwater urns for individuals cremated after death.mathfinance. Those purchasing the Eternal Reef are allowed to press their hands into the soft concrete. Tags . The cement globe contains holes to encourage plant growth and allow fish to swim in and out of your loved one’s ecologically friendly grave. suicide.

com/matlabcentral/ Please read update at http:://www. running newfcn('testnewfcn') generates a file named testnewfcn. a set of rules or guidelines used when writing the source code for a computer program. NEWFCN is a good function I always use when creating new files.m] ====== Did I mention you can customize the exact style by modifying newfcn.Matlab File Style Programming style.m disp(' !!! You must enter code into this file < testnewfcn. is important for a programmer.0.cn 39 . repetitive comments.m to the appearance you like? just that simple! Download at fileexchange/6408 Tags . %% AUTHOR : aBiao @ mathfinance. The actual working MATLAB Version will be also captured.cn %% $DATE : 28-May-2010 18:55:27 $ %% $Revision : 1.1.matlab http://www.m > !!!') % ===== EOF ====== [testnewfcn. Nevertheless. it not only allows the reviewers to know the date and author of the file..m at a predefined style. % % .. For example.246 (R14) Service Pack 3 %% FILENAME : testnewfcn. but also helps the programmer himself to track the file version and improve work efficiency. the new file looks like function testnewfcn() % TESTNEWFCN .mathworks.. read Matlab comment stripping for a lazy way for that.. Uncomment is even more boring. basically it creates a M-File having the entered filename and a specific structure which helps for creating the main function structure. especially for the header part are boring.00 $ %% DEVELOPED : 7.mathfinance.

credit card. developed over 20 years and used by Nobel-winning scientists and leading corporations. It can be used for: Calculate mortgage. it is the full version of Mathematica but at reduced price for recreational or personal use. that's it.. How much does it cost? $295.mathfinance. my second job required R & S+ & Matlab. as you can notice by the number of posts under Mathematica category of this blog. PS: this post is by abiao. In short words. I personally came across this software a few times either due to the codes I could find on my interested topics having only Mathematica version. That's why I only got to know the existence of Mathematica Home Edition today despite the fact it has been in the market for over one year! What is Mathematica Home Edition? as the webpage shows: Quotation Mathematica Home Edition gives home users Mathematica's powerful technology. or the request by my friends & colleagues for analysis. but just because my first job required Matlab & C++. please keep in mind the full non-student version is $2500!! Sounds a good business? Start to Import. not by bo. Tags .mathematica Please read update at http:://www.. visualize and calculate using built-in financial data with Mathematica Home Edition. and student loan payments Evaluate currency exchange rates Monitor stock market returns and predict trends And much more. if you think $295 is a lot. It provides access to curated data. makes it easy to create and share interactive applications.Mathematica Home Edition To be honest. I can't call myself a fan of Mathematica. my master & PhD universities don't have Mathematica installed. and a whole lot more. Mathematica Home Edition contains the same functions that can be found in Wolfram's Mathematica 7. No specific or big reasons.cn 40 . car.

performance measurement and attribution. Data analysis and statistics function. Open architecture of the environment allows users to work with objects of any level.g.g. it allows users to define most basic. open source quantitative portfolio management environment.mathworks. I am unable to get access to Matlab and check it in detail at the moment. implemented within the environment and native to MATLAB. risk measurement and attribution. it sounds good from the introduction of help document. positions or portfolios. stress testing. FinMetrics user interface application and MATLAB scripting may be utilized to facilitate or automate complex and repetitive tasks.FinMetrics I came across a toolbox .com/matlabcentral/ fileexchange/27778-finmetrics if interested. to be further pieced together in a higher level objects. e.matlab Please read update at http:://www. Tags . Quotation FinMetrics is MATLAB based. so I am eager to share it here. please help me test and leave a comment about your thoughts then. low level building blocks.cn 41 . etc. assets and transactions. The object structure and data types are specifically designed to make integration with MATLAB and native FinMetrics functions as easy as possible. as well as extend functionality of the environment. e.FinMetrics this morning. depending on their requirements and expertise. plus highly relevant to our topic quantitative finance. Download it at http://www. Built on concepts of bottom-up approach to application design.mathfinance. design hedge strategies. enable users to conduct scenario analysis. However.

The problem is in the shifts that this brings about.Flash Order The stock market is a mess of people one-upping other people constantly. If this unfair advantage doesn’t go.cn 42 . Tags . The stock market has become a beast to be weary of these days. it means it can also fall just as quickly. Those with a leg up can make an investment risk-free. Others say that it adds ‘liquidity’ to the stock market. Some regard this as an unfair advantage as professional traders would gain advance knowledge on trends before individual buyers. and then sell it for a bit more than they bought it. For example. While this can for a time be a benefit. the big business might buy all of a certain stock.trading Please read update at http:://www. Any chance to get an advantage is seized immediately and one of those opportunities lies in the so called “Flash” Orders. Of course. This advantage causes motion in a violent manner in ways that would not be present in normal conditions. only high-speed computers can see these. This opinion comes. Hopefully order will soon come out of this chaos.mathfinance. and it is only risk-free for them because all of the risk falls on to the lower tier. So far. In a brief summary. what’s to ensure equality in the future? Fortunately the flash order business will very likely be taken away as more than a few well-placed officials have been given varitable heebiejeebies from this mess. from the big businesses who are using the flash order service to their advantage to gain a profit. but a penny less than what the next guy is offering it for. it has upset enough people to be at risk for banning. a flash order is a brief glimpses (no more than milliseconds) of someone else’s exchanges. Another big gripe is that the High Frequency Trading can really mess people over. but once they are seen. of course. they can be used to get a leg up and buy or sell ahead of others.

inserting cell divider under cell window. and if necessary. opening an editor in Matlab by choosing File -> New -> M-file.How to Generate Report Automatically From Matlab Often we have to generate reports to our boss.t)}N(d_2) \. Finally.cn %% Using Black Scholes formula as an example % The value of a call and put options in terms of the Black–Scholes parameters % is: % % $$C(S. depending on your reports. I write the files as follows. copying and pasting the results? It is all right to do like that. colleagues. Third. clicking "Publish to HTML". but the whole process becomes extremely simple with the cell mode in Matlab. it supports TeX equations. inserting Text Markup.Ke^{-r(T . The following steps outline the procedure. Generally those reports include Matlab source codes. changing the codes and re-running to update the report. similar with the title for chapters in Word. selecting cell and enable cell mode in the editor.$$ % % $$P(S. where you are able to insert description text. and clients.t)}N(d_2)) = Ke^{-r(Tt)} .S (SN(d_1) . maths equations. running your matlab codes.t) = SN(d_1) . any change you make regarding description. etc. For a simple demonstration. most importantly. etc. Second. and possibly graphs. it generates report automatically for us.Ke^{-r(T . How do you generate your reports? writing down your equations in Word.S C(S. Fourth.mathfinance. First.cn 43 .t) = Ke^{-r(T-t)} . codes and results will be updated by clicking a simple button: Publish to HTML. a nice-looking report is generated. bold text. %% Cell mode publish demonstration % abiao @ mathfinance. it allows you to type a name for each section.t)$$ Please read update at http:://www.

9.0.% % $$d_1 = \frac{\ln(\frac{S}{K}) t)}{\sigma\sqrt{T . \n'.3).02. put1 = [].02. for simplicity.2.\sigma\sqrt{T . fprintf('Call option value is %g.call) fprintf('Put option value is %g.0.cn 44 . \n'.mathfinance.0.9. call1) The final report is shown at http://www. looks fantastic.cn/attachment/ CellPublishDemo.matlab Please read update at http:://www.t}}$$ % % $$d_2 = d_1 .2.3).put) call1 = []. Tags . end %% Sample plot for demonstration only plot(5 (1:10). for i = 1:10 call1(i) = blsprice(5 i. I use the embedded command [call. put] = blsprice(10.t}$$ (r \frac{\sigma^2}{2})(T - %% Sample code.mathfinance.0.html.

but generally we may end up with a file with dozens.m'. cell arrays of strings.3). it helps ourselves to debug our thoughts and other colleagues to understand the codes efficiently. % check if you can remove me % one more line b = rnorm(5.m'). For example..mathfinance. which is especially indispensable as each programmer has his own coding style. I wrote a simple test. which typically appear when an entire file is read in one go. if not hundreds. The one for today is Matlab comment stripping. However.m: % test the comment strip command using mlstripcommentsfile(infile.cn 45 . So I plan to write a few posts to summarize the old Matlab functions I personally like a lot. Here is a clever way.3). outfile) % by abiao @ mathfinance.1). for the sake of confidential. Needless to say. for instance.5). comment is crucial for programming.m file and prefer to remove the comments and rename it as test-client.cn a = rnorm(10. MATLAB Comment Stripping Toolbox (it indeed has only 3 short files if you are afraid by "Toolbox" ). or read from a file or file identifier. c = rnorm(3. %now i am here % test finished after running the command mlstripcommentsfile('test. I got the file test-client. sorry for that. 'test-client. that is strings with embedded newlines. There is full support for stripping comments from multi-line strings.m to send to others Please read update at http:://www. The code may be given in strings. rnorm(3. etc.Matlab Comment Stripping I have been doing an internship in London since last week and haven't got enough time to write new posts. under certain circumstances we may have to remove those comments. How do you do that then? delete the comments line by line? it is OK for a small file. Basically it is a small collection of utilities for stripping MATLAB comments from MATLAB code. lines of comments. what's worse is those comments intersect and we have to be carefully to find them out..

3). isn't it? you can download the toolbox at http://www.1).matlab Please read update at http:://www.." You may choose to modify the codes by deleting 'tokenize'.cn 46 .5).mathworks.3).. b = rnorm(5.mathfinance. rnorm(3. c = rnorm(3.a = rnorm(10.com/matlabcentral/fileexchange/4645. Nice. Tags . PS: the original codes use old Matlab version so you will get the warning "Warning: The 'tokenize' option for regexprep is now the default behavior.

cn 47 . Another great example is the Viactuals Frauds. Then of course there are scammers that will take your investments to buy their own wants and luxuries rather than using it on the policy you wanted. Your money could easily be pocketed and you are left all the poorer. Normally with very official looking documentation and after you’ve been hopped from bank to bank. You also walk away happy knowing that your investments made a sick person’s life a little better… right? Well just like any child in school there are people out there who will fake sickness for the attention and the money. back ‘in the day’. One great example would be the use of historical Bonds. And the world goes ‘round. A way for the government to obtain money with the promise to return it with interest. When they die you get the full death benefit from said policy. It is this need for quick cash and no work that leads people to be drawn into great. and finding means to get money quickly becomes almost a necessity.mathfinance. It is these relics or mock-ups of them that are sold to you by the conartists. You see.Financial Scams A guest post of Bo. These bonds were payable in gold. sometimes historical financial scams. so will not likely be found. The pretense is that you buy someone’s life insurance policy. and after a certain maturity point could be cashed in. there were a number of gold bonds issued for a variety of reasons. Please read update at http:://www. If your lucky. The best way to avoid these historical financial scams is to stay away from any offer that looks too good to be true unless you have the help of a real attorney or somebody who really knows what they are talking about. This is truly a great demonstration of one of the historical financial scams. you find out that it is in fact worth nothing except maybe some sentimental collector’s value. Nothing more than a piece of history waiting to be preserved in a museum. making small investments. it may actually be an actual Bond. People have a great amount of concern for money. in which case you could get a small amount of money from a museum that hosts them. Scam artists are usually professionals at their trade. The problem is that after a particular date they became useless.

cn 48 .mathfinance.Tags .scam Please read update at http:://www.

The VarCalc Pty Ltd Australia is a specialist in financial modelling & their numerical methods.com.varcalc. The VarCalc will launch new calculators regularly. actuarial mathematics. bond and financial derivatives.mathfinance. Tags . These online tools cover many aspects of finance and investment like home loan & mortgage.calculator Please read update at http:://www.VarCalc Online Financial Calculator A guest post of Kang Wang. savings. personal finance.cn 49 . On the web site http://www.au. it provides a series of innovative and comprehensive financial calculators for both Australian and international investors. web tool development and Adobe Flash media design.

among all the books on statistics and millions of resources on normal distribution the exponential counterpart only has two genuine reference books. 2. Crow EL and Shimizu K Eds. Cambridge University Press. e^{-\frac{\left(\ln x-\mu\right)^2}{2\sigma^2}} cdf: \frac12 + \frac12\. The lognormal distribution is used extensively as an approxmiation to the price of a financial asset after time t given a known price at t=0. Lognormal Distributions: Theory and Application. +Inf) pdf: \frac{1}{x\sqrt{2\pi\sigma^2}}\. However there is very little known about the lognormal distribution and the resources are even more limited. However my job is to give you some light in the matter.mathfinance. The lognormal distribution. Cambridge UK.\mathrm{erf}\Big[\frac{\ln x-\mu}{\sqrt{2\sigma^2}}\Big] mean: e^{\mu+\sigma^2/2} median: e^{\mu}\. mode: e^{\mu-\sigma^2} variance: (e^{\sigma^2}\!\!-1) e^{2\mu+\sigma^2} skewness: (e^{\sigma^2}\!\!+2) \sqrt{e^{\sigma^2}\!\!-1} kurtosis: e^{4\sigma^2}\!\! + 2e^{3\sigma^2}\!\! + 3e^{2\sigma^2}\!\! . I tried finding books about the lognormal distribution and came up with the following 2 (only 2) : 1. see text) cf: representation Please read update at http:://www. 1988.3 entropy: \frac12 + \frac12 \ln(2\pi\sigma^2) + \mu mgf: (defined only on the negative half-axis. 1957. mu an element of R — location support: x =(0. New York.Log Normal Distribution A guest post by Sidharth Mallik.cn 50 . Lets start with the basic properties of the lognormal distribution : parameters: sigma^2 > 0 — squared scale (real). Aitchison J and Brown JAC. Dekker.

wikipedia. So i would redirect you to this page check out some other ways how this can be done Please read update at http:://www. now for the estimation properties. E[exp(m+sigma^2/2)] => exp(E[m+sigma^2/2]) according to the Jensen inequality. but there is error associated with this.wikipedia. we should have E[M] = E[exp(m+sigma^2/2)] But.mathfinance. Let E[.org/wiki/Log-normal_distribution.org/wiki/ Jensen_inequality.] denote the expectation of the quantity within the brackets and let M denote the mean of the lognormal distribution. for those of you who don't know what this is refer to the http://en. An example of the error is : say you decide on a parameter m as the mean of the corresponding normal distribution and sigma^2 as the variance.\sum_{n=0}^{\infty}\frac{(it)^n}{n!}e^{n\mu+n^2\sigma^2/2} is asymptotically divergent but sufficient for numerical purposes Fisher information: \begin{pmatrix}1/\sigma^2&0\\0&1/ (2\sigma^4)\end{pmatrix} As you may guess the same information is available at wikipedia at http://en. Hence there are problems with this form of the estimation.Then if the above estimator was unbiased. well conviniently you would want to estimate the mean and the variance of the corresponding logarithmic distribution which happens to be normal and then may be use the above formulas to find the lognormal's parameters.cn 51 . the you may say that the corresponding mean of the lognormal distribution is simply mean of lognormal distribution = exp(m+sigma^2/2) However using some math i will show you that this is not an unbiased estimator.

ssrn.x2) exp((sigma1*sigma2)-1)*exp(m1+m2+(sigma1^2+sigma2^2)/2) The expression for the correlation coefficient is rho = [exp(sigma1*sigma2)-1]/sqrt(exp(sigma1^2-1)*exp(sigma2^2-1)) For more such references and also to get a table for actual values check the following out http://www.edu/shared/shared_stuartfaculty/ whitepapers/thomopoulos_some. the two standard deviations and the correlation coefficients. The expression for the covariance is cov(x1. What I mean to say is that the variable has let us say a level r on normal days. Next identify the fact that the variable contains kind of multiplicative factors in the sense that say there are levels to the quantity in multiplicative terms.pdf I will want to finish off with some intuition as to where can you apply the lognormal distribution.com/sol3/papers. Similarly for the lower side.5 times r then even higher means that it goes to say 5 times r. If your variable is indicative of this then it suggests a lognormal distribution.mathfinance. Now first identify if the variable under study is throughout positive or not like a stock price.distribution = Please read update at http:://www. Now the natural question is how to calculate the correlation coefficient.iit. Tags .cfm?abstract_id=1285465 Now having resolved the univariate case we turn our attention to the bivariate case.stuart.Then when you expect the variable to go up it goes upto 1.cn 52 .http://papers. The parameters in this case are the two means.

The results are: Compared with table 1.com/matlabcentral/fileexchange/9061. standard deviation.cn 53 . and the means of 6m and 30y are Please read update at http:://www. Case 1: Based on the simulated data. 20 year and 30 year. are non-normally distributed as the kurtosis is significantly larger than 3. 2 year. 10 year. in the Extra->COP folder. we express a 10 bp bullish view on the 2-20 spread and a 5 bp bearish view on the 2-5-10 butterfly. other things being equal. I skip the technical section. We expect that the means of 2y.Black Litterman Model (II) This is the second part of Black Litterman Model. and we are interested into the following six key interest rates: 6 month. the means of 5y and 20y are increased. (table 1) We can easily see from the table 1 that all of the key rates. Case 2: Contrary to case 1. which can be found in the original paper Beyond Black-Litterman in Practice: A Five-Step Recipe to Input Views on Non-Normal Markets. 5y. which are consistent with our assumed views. we assume that those views are uniform distributed. and the Matlab codes can be downloaded at http://www. 5 year. since we are bearish on 2y and 10y.000 scenarios based on a t Copula with skew t marginal distribution. as expected. we consider a practitioner who has a 10 bp steepening view on the 2-20 spread and a 5 bp bullish view on the 2-5-10 butterfly. we notice the means of 2y and 10y are decreased significantly.mathfinance. Further. which corresponds to normal distribution. in particular the short period rates. the sample mean.mathworks. Suppose we would like to invest in the US treasury market at a weekly investment horizon. check the first part at Black Litterman Model (I). and the means of 5y and 20y are increased. 10y and 20y change another way around. skewness and kurtosis of the six key rates are shown in table 1. we use Monte Carlo simulation to generate 100. and bullish on 5y and 20y. the means of 2y and 10y are increased significantly. For illustration. and the confidence level is 25% in both views.

cn 54 . the even moments are only marginally affected. Case 3: The views are the same as for case 1.mathfinance. identical with what we expected. Our robust analysis demonstrates the strong consistence of the COP approach. These two posts are a short summary of the original paper and Matlab implementation. the means of 2y and 10y are decreased more significantly. but we increase the confidence for both view from 25% to 75%. We expect the distribution of posterior market alters more significantly. when compared with the results of case 1. please read the source for detail. Tags . Based on the posterior market values we are able to do return mapping and portfolio optimization. and the means of 5y and 20y are increased more pronounced. For all views.again the same as those of prior market.black-litterman Please read update at http:://www.

it tries to maximize return and minimize risk by carefully choosing different assets. Black-Litterman model bypasses these problems by not requiring the user to input estimates of expected return.mathfinance. therefore it does not allow an investor to have views on the direction of assets growth. The author also present general steps to implement the approach in practice. The user is only required to state how his assumptions about expected returns differ from the market's and to state his degree of confidence in the alternative assumptions. specifically. skew t distribution is used for markets and uniform distribution is for investors views as examples. Initial estimates often lead to extreme portfolio solutions and have to be adjusted many times before they can be considered acceptable by the decision makers. I plan to write two posts on the paper. As a fan of this model. the Black-Litterman model computes the desired mean-variance efficient asset allocation. Please read update at http:://www. From this. it is difficult to come up with reasonable estimates of expected returns. Although Markowitz model is widely used in practice in the financial industry. It is right because of this character that makes Black-Litterman model be popular both in industry and academia since it was initially developed in 1990. in principle the Markowitz model offers a solution once the expected returns and covariance of the assets are known. it has at least the following shortcomings. and a robust analysis will be shown to demonstrate its consistence. Markowitz model assumes the future distribution of assets returns will be exactly the same as that of historical returns. In this paper Beyond Black-Litterman in Practice: A Five-Step Recipe to Input Views on Non-Normal Markets. most of its applications are based on the assumption of normally distributed markets and views. however. First. Second.cn 55 . Although the covariance of a few assets can be adequately estimated. instead it assumes that the initial expected returns are whatever is required so that the equilibrium asset allocation is equal to what we observe in the markets. the pros and cons of Black litterman will be discussed. Markowitz mean-variance model is the foundation of modern portfolio theory.Black Litterman Model (I) Black-Litterman model is widely used for asset allocation. the author Attilio Meucci extent the Black-Litterman model to allow non-normal distribution assumption.

For instance. this strong assumption makes the application of the approach less evident.cn 56 . he may have a more accurate view such as ‘I am 90% sure that the return of stock A will stay between -1% and 1% with equal chance’.mathfinance. the market has been assumed to be skew-t distributed. the original Black-Litterman model helps portfolio managers to compute the distribution of the posterior market that incorporates their subjective views with respect to the prior distribution. the proposed implementation in the paper has a distinct distribution under certain assumptions.black-litterman . you would expect a practitioner to input his views in a less informative manner. the author relaxes the normal distribution assumption and in principle allows any distribution. COP approach can handle a portfolio with any number of risk factors. All these assumptions are being made considering the entire scenario is normally distributed. At the same time. his views may be a set of prices at several specific monitoring times. although the implementation is pretty straightforward for any distribution by Monte Carlo simulation. Meucci (2006) solves the above-mentioned issues of the original BlackLitterman model by developing an approach called Copula-Opinion Pooling (COP).However. The second part will be about the Matlab implementation and results analysis. In fact. allocation Please read update at http:://www. because Monte Carlo simulation can be applied for almost any distribution and is suitable for any dimension (at least in theory). However. when the option is supposed to be exercised. it is frequently observed that returns in equity and other markets are not normally distributed. instead of a view like ‘I am 90% sure that stock A will have a 2% expected return’. Indeed. Tags . or for an Asian option Trader.

The quants who designed the trading systems that blew up in 2008 generally assumed Please read update at http:://www. The 10-day moving average of the CBOE Equity Put/Call Ratio has fallen to 0. Regardless. a measure of volatility based on options premiums. not falling prices. which occurred in July 2007. the lowest reading since October 2000. This figure matches the all-time low. the market rose virtually every day. 2. So. It is rare to have technical indicators all lined up on one side of the ledger. times of the two most extreme expressions of stock-market optimism ever. Today they are just as aligned but on the bearish side. it’s taken only 13 months.mathfinance. Consider this short list: 1. CMT. The current reading is less than half the level it was thirteen months ago and its lowest level since the all-time peak of stock market optimism from January 1999 to September 2000. They were lined up this way—on the bullish side—in late February-early March of 2009. so there is little doubt that the percentage of cash in mutual funds is now at an all-time low. The latest report shows only 3. when wave (2) of ((1)) peaked out and led to a Dow loss of 50% over the next ten months. which means that the volume of trading in calls has been more than twice that in puts.50. and that’s bearish.5% cash on average in mutual funds. Low premiums indicate complacency among options writers. lower than in 2000. 3. the month when the Dow Industrials-plus-Transports combination made its all-time high. the month that the NYSE Composite Index made its orthodox top. In March. the confidence that mutual fund managers and investors express today for a continuation of the uptrend rivals their optimism of 2000 and 2007.45. This time.cn 57 .The VIX. has been sitting at its lowest level since May 2008.What Do These 8 Technical Indicators Mean for the Markets? A guest post by Robert Prechter. It took years of relentless rise following the 1987 crash for investors to get that bullish. The 30-day average stands at 0. investors are interested primarily in betting on further rising prices. The latest report pertains only through February. lower than in 2007! We will know for sure when the next report comes out in early May. But wait.

when E was negative.6% bears.In October 2008 at the bottom of wave 3 of (3) of ((1)).com. But low volatility is actually the opposite. the market also rallied four months past the extreme in advisor sentiment.4% and 2. a poll conducted by Trade-Futures. 7.cn 58 . only 2% of traders were bullish.that low volatility meant that the market was safe.5%. 23 years ago! As happens going into every market top.The price/earnings ratio. respectively. 4. 5. falling stocks on the NYSE. The only market tops of the past century at which this figure was lower are those of 2000 and 2007. Prior to recent months. In December 2009.mathfinance. Combined with the readings on the Equity Put/Call Ratio. a warning that things are about to change. The bull/bear ratio in October 2008 was 0. The reading has been registering highs in the 86-92% range ever since last September. The fact that the options market gets things backward is a boon to speculators. when it was 1. from 122 to 23. to 18. 6. reports the percentage of traders who are bullish on the S&P. so today’s readings make quite a contrast in a short period of time.The Trading Index (TRIN) is a measure of how much volume it takes to move rising stocks vs. puts right now are a bargain. Whenever options writers are selling options cheap.The Daily Sentiment Index. the last time the DSI saw even a single day’s reading at 90% was June 2007. Then it crashed. so at such times they would advise hedge funds to raise their leverage multiples.1%. bearish and neutral). it has been as high as 3. the ratio has moderated a bit. the Please read update at http:://www. has improved tremendously. 8. The 30-day moving average of daily closing TRIN readings has been sitting at 0. In the past five months.The Dow’s dividend yield is 2. Ratios of 6 or 7 occurred at major stock market bottoms during that time. using four-quarter trailing real earnings.4. it was 2.4. This reading was the lowest percentage since April 1987.9% bears. But 23 is in the area of the peak levels of P/E throughout the 20th century.90. In 1987. the market is likely to move in a big way. At the 1929 high. At the March 2009 bottom. it reported only 15.9%. reported that more than half of advisors were bearish. We will see quite a few quarters of infinite P/E from 2010 to 2017. P/E was infinite during the final quarter of 2008. the Investors Intelligence poll of advisors (which has categories of bullish.

trading Please read update at http:://www.lowest level since June 2007. This means that it has taken a lot of volume to make rising stocks go up vs. It means that buyers of rising stocks are expending more money to get the same result that sellers of declining stocks are getting. download the rest of this 10-page issue of the Elliott Wave Theorist free from Elliott Wave International. Learn more here. Tags . For more market analysis and forecasts from Robert Prechter.cn 59 . making falling stocks go down over the past 30-plus trading days. Usually long periods of low TRIN exhaust buying power.mathfinance.

it is easy to convert a cell format date to what matlab recognizes using cell2mat() and then datenum(). Stanley suggests to use the following code: datenum(datevec(num2str(dates). matlab returns a number 733737 for '25/11/2008'. those different formats really bring a problem. however. reformat the string using datestr(. and the others from Wharton Research Data Services.matlab . remove '/' by using find(b~='/'). excel Please read update at http:://www.cn 60 . stanley. it is more efficient. the date is in different format. as I need to match the dates and compare the prices. convert the string to number using str2num().Dealing with Excel Date in Matlab I was drived crazy yesterday by dealing with the date in Matlab. it becomes a string 2008/ 11/25. cheers. it becomes a string 20081125. perfect. finally. it is much better than my method as it allows us not only for date comparison but also for calculation. how can I compare that with 20081125 then? what I am thinking is: first. it is eventually a double number I need 20081125. do you have a better idea? please share with us by leaving a comment. or in a cell format as '25/11/2008' (or something similar) after I import the data with xlsread() command in Matlab. then I am able to use and match the date from different sources. second. third. some from datastream. many thanks. Tags .26). it becomes a string 25/11/2008. here dates is double number. convert the cell format to string using cell2mat(). what's more. unfortunately. It sounds lengthy. for instance.mathfinance.'yyyymmdd')). I have to download data from different sources. either in a double format as 20081125.

Kalman Filter Finance Revisited Inspired by @MichaelRW at Twitter.cn 61 . I decide to continue the topic on Kalman Filter following posts Kalman Filter Example and Kalman Filter Finance. it is a widely used mean-reverting process with SDE A three-factor CIR model has a measurement equation and a transition equation source from the paper "affine term structure models: theory and implementation" downloaded at www.xls'). (Vasicek model is simplier than CIR. ncol] = size(Y). 5Y yield Please read update at http:://www.cn %%CIR parameter estimation using Kalman Filter for given treasury bonds yields % check paper ""estimating and testing exponential-affine term structure % models by kalman filter " and "affine term structure models: theory and % implementation" for detail % S(t 1) = mu F S(t) noise(Q) % Y(t) = A H S(t) noise(R) % read data Y Y = xlsread('ir. Below are the sample Matlab implementation: function [para. 6M. tau = [1/4 1/2 1 5]. so the latter is chosen as an example). [nrow.mathfinance.bankofcanada.ca/en/res/wp/ 2001/wp01-15a. Specifically. % stand for 3M. 1Y. sumll] = TreasuryYieldKF() % author: biao from www.mathfinance. Kalman Filter is applied to estimate the parameters of a Cox Ingersoll Ross (CIR) one factor interest rate model.pdf I skip the derivation part and recommend the following two papers: "estimating and testing exponential-affine term structure models by kalman filter " and "affine term structure models: theory and implementation" to understand the transition and measurement equations.

sumll = fval. nrow.1. AffineAlpha = 2*kappa*theta/ (sigma^2)*log(2*AffineGamma*exp((AffineGamma kappa lambda)*tau(i)/2)/((AffineGamma kappa lambda)*. R = eye(ncol). % parameter setting for measurement equation A = zeros(1. tau.1. % parameter setting for transition equation mu = theta*(1-exp(-kappa*dt)).ncol)].. para = x.01*rand(1.[].Y.[]. %volatility of measurement error sigmai = para(5:end).[ones(1. fval] = fmincon(@loglik. para0. ncol). tau.[]. (exp(AffineGamma*tau(i))-1) 2*AffineGamma)).[].cn 62 .05. 0.[].ncol)].0.0001.1.mathfinance.0001. for i = 1:ncol R(i. [x. end flip over to next page. -0. 0.00001*ones(1. AffineBeta = 2*(exp(AffineGamma*tau(i))-1)/((AffineGamma kappa lambda)*(exp(AffineGamma*tau(i))-1) 2*AffineGamma). initV = sigma^2*theta/(2*kappa). 0.[]. lambda = para(4).Y. nrow.. A(i) = -AffineAlpha/tau(i).[0. 0.para0 = [0. end dt = 1/12.. sigma = para(3). ncol) �lculate log likelihood % initialize the parameter for CIR model theta = para(1). %monthly data initx = theta. ncol).0001. F = exp(-kappa*dt).length(para0))].*ones(1. -1. kappa = para(2). H = A..0.ncol). H(i) = AffineBeta/tau(i). for i = 1:ncol AffineGamma = sqrt((kappa lambda)^2 2*sigma^2).i) = sigmai(i)^2. Please read update at http:://www. function sumll = loglik(para.

5*log(DetY)-0.:)-PredY.end %now recursive steps AdjS = initx.cn 63 . end sumll = -sum(ll).1110 Click to download Tags . VarS = VarS*(1-KalmanGain*H'). AdjS = PredS KalmanGain*PredError'.5*PredError*InvVarY*PredError'.0700 lambda: -0. ll = zeros(nrow. VarS = initV.mathfinance. InvVarY = inv(VarY). %updating KalmanGain = VarS*H*InvVarY.0613 kappa: 0. VarS = F*VarS*F' Q. PredY = A H*PredS. %predict values for S and Y Q = theta*sigma*sigma*(1-exp(-kappa*dt))^2/(2*kappa) sigma*sigma/ kappa*(exp(-kappa*dt)-exp(-2*kappa*dt))*AdjS. you should get the parameters values as: theta: 0.xls file to test the codes. PredError = Y(i. VarY = H'*VarS*H R. DetY = det(VarY).1).filter Please read update at http:://www.2249 sigma: 0. %log-likelihood for i = 1:nrow PredS = mu F*AdjS. end I also attach the ir. ll(i) = -(ncol/ 2)*log(2*pi)-0.

mathfinance. one of our contributors currently studying MFE.barrier . so we decided to plot them. Jovan. A couple of weeks ago one of my friends had an interview at a local hedge fund and he had to prepare Greeks of exotics. Options in FX markets there is a nice and very clear analytical solution. In Uwe Wystup’s book. Uwe Wystup suggests that then one should do a barrier shift to prevent this so that one should rehedge your portfolio based on that shifted barrier.Down and Out Call Barrier Option This post is writen by Jovan.cn 64 . If you are interested to see this please download the attached Mathematica files and check it out. Also to check the solution of down and out call we plotted the down and in call and their payoff combines into a regular call so that there wasn’t a mistake. If you do not have mathematica there is a mathematica free file viewer form Wolfram. Click to download Tags . option Please read update at http:://www. and mathematica 7 is good in symbolic so the code just takes the derivatives and plots them. thanks. Together with the codes there is a mini manipulate idea where you can see the interaction of the Greeks with other input parameters such as a Barrier where you see that the delta explodes when you are close to expiry and to the barriers.

defaultrisk. no matter using a private laptop at home. I was surprised to find mathfinance. search enhancement and web discovery based on sites bookmarked by users.mathfinance.0 site offering bookmark synchronization. or a shared computer at a coffee bar.cn/postyour-article-on-this-blog/. many thanks for your bookmarking. therefore to some extent it shows the popularity of a site. Have a nice weekends.com. blog Please read update at http:://www. Although it may not be treated seriously by others. as always.cn/ looking-for-paid-contributors/ and http://www.quant . your support is much appreciated.. please consider to join us by reading our policy http://www. I have no idea when it was listed. your 10 seconds action means a lot to us.cn 65 . It is our great pleasure to have a blog among those giant sites such as wilmott.Top Ten Sites in Quant and Quantitative Finance Xmarks is a hot web2.mathfinance. Quantitative Finance Collector is a Top Site in Quantitative Finance Review This Site Quantitative Finance Collector is a Top Site in Quant Review This Site We have been looking for paid contributors and guest writers.com.cn is listed as one of the Top Ten Sites in 'Quant' and 'Quantitative Finance' several minutes ago when I happened to search a keyword in Xmarks. I am always able to find and read my interested sites. quantlib.com. quantnet. Tags .mathfinance. the rank does make me happy and will continuously encourage our contributors and me to write down what we believe useful.org. Personally I use it frequently as it gives me a convenient way to bookmark my favourite wherever I am. etc.

Download the programming files of Estimating exponential affine term structure models at the author's home page http://www. namely the Gaussian case (Vasicek 1977) and the non-Gaussian case (Cox Ingersoll and Ross1985 and Chen and Scott 1992).cn 66 . however.Kalman Filter Finance A general example of Kalman filter algorithm was briefly discussed at the blog post Kalman filter example.filter Please read update at http:://www.rotman. When it comes to an application of Kalman filter in finance. so check yourself then.utoronto. where a Matlab toolbox link was shared as well. one of the best and ealiest paper is Estimating and Testing Exponential-Affine Term Structure Models by Kalman Filter (a simple search at Google Scholor tells you this paper has been cited by over 180 times). besides a detailed description of how to apply this algorithm step by step. they are in GAUSS language I am unfamiliar with (I used to use it when I studied in Germany seven years ago). Tags . in the paper the authors do an empirical analysis of Kalman filter to two special cases of interest rate models.ca/~jcduan/.mathfinance.

48 Hours Left For How to Spot Trading Opportunities Just let you know there are only 48 Hours Left to Get Your Free 47-Page eBook: How to Spot Trading Opportunities. this valuable eBook is offered free until April 23.trading . Don’t miss out on this rare opportunity to change the way you trade forever.cn 67 . Senior EWI Analyst Jeffrey Kennedy will show you how some of the simplest rules and guidelines have some of the most powerful applications for trading. 2010. Created from the $129 two-volume set of the same name.mathfinance. Tags . ebook Please read update at http:://www. The How to Spot Trading Opportunities eBook features 47-pages of easy-to-understand trading techniques that help you identify highconfidence trade setups. Download it NOW.

a click on finance section you will notice the following subcategories: or you can search directly by typing a keyword. I once list the sites where we can download free data at financial data download.A searchable directory of numerical data on the internet.mathfinance. unfortunately.data Please read update at http:://www. users can therefore look for their wanted data on one site only. here is a good free data directory site I came across a few days ago: wikiposit . For example.cn 68 . Basically Wikiposit spiders those web sites with data and collects data source information. mostly economic and financial.Free Data Directory Data access is a prerequisite to quant finance study. http://wikiposit. Currently it has about 110. data is not cheap. take a look if you feel useful.org/w Tags .000 data sets.

Step 4: forecasting the state vector of the next time period conditioning on the updated values of the previous period. since the variables in the measurement equation are observed. and the transition equation allows the unobserved variable to change over time. as the names suggest. we can calculate the prediction error. interest rates follow a Cox Ingersoll Ross (CIR) process.cn 69 . together with a kalman gain factor. and obtains the state variables by inversion.mathfinance. such as due to bid-ask spreads. which typically assumes that the data series is observed without errors. for example.. Step 2: forecasting the measurement equation given the initial values. Kalman filter assumes that all data is observed with measurement errors. for example. which is one of the big reasons why it becomes more and more popular in economics and finance. Please read update at http:://www. as many models in these fields depend on data that are either non-observable. etc. The following steps outline the specific procedures of a kalman filter example: Step 1: writing down the measurement equation and transition equation. Step 3: updating the inference about the state vector incorporating kalman gain matrix and the prediction error. initializing the state vector.Kalman Filter Example The kalman filter is a time series estimation algorithm that is mainly used combined with maximum likelihood approach to estimate parameters for given data. Compared with pure maximum likelihood. the measurement equation relates an unobserved variable (such as interest rates) to an observable variable (such as bond prices). it starts with initial values for the state variables and a measure of the certainty of the guess. and then use these initial values to predict the value of the measurement equation. There are two basic equations of a Kalman filter: the measurement equation and the transition equation. Step 5: calculating the log-likelihood function under a certain distribution assumption and maximize the log-likelihood. or subject to noise. Essentially Kalman filter is a recursive algorithm. to update the values in the transition equation. usually a Gaussian distribution is applied. energy future prices are easily observed but underlying assets are not. repeat the process for the next time period and finally we are able to estimate the parameters values by maximum likelihood. bond prices are observable but interest rates are not.

please read the paper "A simplified approach to understanding the kalman filter technique" for detail. Interested readers can choose to download a Kalman filter toolbox for Matlab.cn 70 .For a detailed Kalman filter example in excel. Click to download Tags . I also wrote a sample tutorial file trying to mimic the results but failed.filter Please read update at http:://www.mathfinance. possible reasons are poor performance of solver in excel and the small simulated sample periods.

The option value. Here in this. Thus you can have a profit of $1000.What You Need to Know About Option as A Beginner Part II A follow up of yesterday's introductory article What You Need to Know About Option as A Beginner Part I (last one on this topic). Whatever the formula used. which will be the bad part of it. but not the obligation to buy an agreed quantity of a particular commodity or financial instrument (the underlying instrument) from the seller of the option at a certain time (the expiration date) for a certain price (the strike price). Let's use the current month for this example.mathfinance. not by the way of options. The buyer of the option has the right. The call price must reflect the "likelihood" or chance of the option "finishing in-the-money". This means that you will be losing around $1000 for buying the stocks. varies with the underlying price and with time. and therefore price. But of course. a) Call option It is the option to buy shares of stock at a specified time in the future. The buyer pays a fee (called a premium) for this right. And you are buying those stocks. $115/share and so you would end up making $500 over what your option costs were. But if you were to use this option contract and if it were to expire at the same stock price of 110/share then you would have the option to buy 100 shares of that stock at $100/share. Let your requirement be to buy 100 shares of the stock which is currently trading at $110/share. Please read update at http:://www. if the stock price drops to $105/share then you will end up losing $500 on the deal. The most common method is to use the BlackScholes formula (which discussed before). The science of determining this value is the central tenet of financial mathematics. For example. say. The price should thus be higher with more time to expire and with a more volatile underlying instrument. the buyer and seller must agree on the initial value (the premium). then you would be paying $11000 for the 100 shares. otherwise the exchange (buy/sell) of the option will not take place. Whereas the seller is obligated to sell the commodity or financial instrument should the buyer so decide.cn 71 . Often it is simply labeled a "Call". lets hope that the stock at the time of expiration will be. which is nothing but the cost to buy the option. let's look at a call option contract at a strike price of $100 for a given stock.

then you would face a lose of $10/share. this future value additive must be accounted for in your investment plan. Future Value From the above example for both the “call” & “put” option contracts.cn 72 . If the current value for the stock is $90/share and you wanted to buy the $100 put option contract you would probably be looking at a price of $10 or $11 in the option price listing. say by $10. the writer (seller) and the buyer of the option. Again. Tags . And for this put option. But in the other case.option Please read update at http:://www. Remember the longer you hold onto an option (call or put).mathfinance. The buyer acquires a short position by purchasing the right to sell the underlying instrument to the seller of the option for specified price (the strike price) during a specified period of time. where the share value increases beyond $100. Thus in order to understand option pricing. else if you let it expire then you would end up paying the premium to the writer unnecessarily. you would have got an idea that calculating the future value of the option. it is always advisable to exercise the contract if the current stock value is greater than your contract value. then you would get a profit of $10/share. If the stock value doesn’t get increased in the period of your put option contract. like you want to buy an put option contract at a strike price of $100 for a given stock. Check Varieties of programming codes on option valuation for implementation.b) Put option A contract between two parties. the less valuable is that future value portion. So that you can have a profit. Let’s look at the same example discussed for ‘Call option’.

Knowledge about Option pricing is essential prior investing in those. Here in this article. and • an estimate of the future volatility of the underlying security's price over the life of the option. These models are implemented using a variety of numerical techniques. standard option valuation models depend on the following factors: • The current market price of the underlying security. between a buyer and a seller. The most basic model is the Black-Scholes model. If the buyer chooses to exercise this right. then you are in the right spot. Types (Call and Put) A “Call option” gives the buyer of the option the right to buy the underlying asset at the strike price whereas the “Put option” gives the option to sell the underlying asset at the strike price.What You Need to Know About Option as A Beginner Part I My third introductory article. The buyer may choose not to exercise the right and let it expire. you could get a basic knowledge about the Option. out of the money). or a derivative instrument. • the strike price of the option. that gives the buyer of the option the right. you need know about the option first.cn 73 . Option is nothing but an official contract. its type & pricing etc. Basic definition of Option In order to understand about Option pricing. to buy or sell a specified asset on or before the option’s expiration date. In general. The underlying asset can be a piece of property. but not the obligation. Check Varieties of programming codes on option valuation for Please read update at http:://www. • the time to expiration together with any restrictions on when exercise may occur. a security (stock or bond). If you are a novice. such as a futures contract. Valuation models The value of an option can be estimated using a variety of quantitative techniques based on the concept of risk neutral pricing and using stochastic calculus. the seller is obliged to sell or buy the asset at the agreed price.mathfinance. at an agreed price (the strike price). particularly in relation to the current market price of the underlying asset (in the money vs.

.mathfinance.implementation. To be continued.cn 74 .option Please read update at http:://www. Tags ..

which eventually underestimates the Value at Risk and other risk measures. the probability that X2 exceeds its q-quantile. I read roughly a working paper Value at Risk – MATLAB Application of Copulas on US and Indian Markets.cn 75 . I would stay away Gaussian Copula if I were a risk manager. one is under Gaussian copula and the other one is under Student t copula. Gaussian copula has much smaller upper and lower tail dependence than Student t copula. as you can easily see.Value at Risk Estimation with Copula Value at Risk is widely used to measure the downside risk. especially for lower tail dependence. in a bivariate case. we must be very careful as basically Gaussian Copula assumes the joint dependence structure normally distributed and as a result. Tags . given that X1 exceeds its q-quantile (upper tail dependence) when q->1. where the authors calculate the Value at Risk (VaR) using the bivariate Gaussian Copula distribution implemented in MATLAB for the Dow-Jones index and the National Stock Exchange index. It is good to use Gaussian Copula together with some rank correlation (like Spearman's rho or Kendall tau) to model the dependence. the upper and lower tail dependence approach to zero when the significant level limits to one and zero. For example.var . below are two simulated return series. in other words. although both have the same marginal distribution. and you? Download Copula toolbox and other code files at Copula if interested. given that X1 is below its q-quantile (lower tail dependence) when q->0 are zero. no matter which marginal distribution you choose.mathfinance. and the probability that X2 is below its qquantile. copula Please read update at http:://www. therefore the combination of VaR with Copula is fantastic in terms of accurately capturing the true risk embedded. and Copula is a generalized dependence structure instead of linear correlation to model dependence. however.

cn/valuation-of-stock-option-with-discretedividend/. we'll publish your post under your name ASAP.cn/value-at-risk/ http://www. you write a post about math finance.Looking for Paid Contributors As the old saying goes: Many heads are better than one. the post is original. the problem doesnot need to be sophiscated at all: here are a few examples: http://www. and if you agree. the post should be above 250 words.mathfinance. 3.blog Please read update at http:://www. a paper you read and its implementation you wrote.cn. Of course we can't make you rich but it is a show of our gratitude and bottles of beer we'd like to invite you. You will get paid $5 ~ $15 per post directly to your PayPal or bank account. we can also leave your simple profile at About us section. Different from guest post writers who are allowed to promote their sites or products. After we receive your post.cn/sudoku-spreadsheet-example-matlabexcel-link/ http://www.cn 76 . we'll let you know how much we are going to pay (currently between $5 and $15) depending on the quality. For example. the post is only published on mathfinance. Please support us by sending your articles and files to abiao @ mathfinance. 2. At your choice. ideally with a sample code file (like. Payment will be sent without minimum amount limit soon after we publish your articles. how to calculate ***). Tags . After joined by Bo. paid contributors can receive a little sum of cash for their contributions to this blog. or write a guest post if you prefer that way.mathfinance. Here are the simple rules: 1. Cheers. we are still looking for contributors who are able to write quality posts to our blog readers.mathfinance.cn (remove the spaces). 4.mathfinance. not copied from somewhere else.

To learn more about InvestingChannel at: advertising on MathFinance. Engage our valuable demographic of highly educated quantitative research readers through multiple placement options including premium display.com (p) 646. you can optimize your campaigns to maximize return on investment with the highest level of service.Advertise with us Thank you for your interest in advertising on MathFinance.290. Available ad sizes include 728x90. email and newsletters.com Tags . sponsorships.467.cn contact advertiser@investingchannel. 300x250. InvestingChannel is one of the fastest growing financial media companies and is our exclusive advertising partner. co-registration and lead generation.8452 www.cn 77 .investingchannel.ad Please read update at http:://www.cn. We have approximately 13. home page takeovers and other creative advertising solutions.7824 (f) 646. buttons and links. 88x31 and many more. With InvestingChannel’s seasoned team of professionals.000 unique visitors that view 40.mathfinance.000 pages per month. 160x600.

Systems having large number of coupled degrees of freedom like fluids. After its introduction many new methods came. These are also effective in solving complicated boundary conditions and multidimensional integral problems. as they are commonly referred to as are a class of computational algorithms that use repeated random sampling to obtain the desired results.cn 78 . generating input randomly from the domain. They find their use in simulating mathematical and physical systems. strongly coupled solids. performing a deterministic computation and aggregating individual result to the final results. Monte Carlo methods or Monte Carlo Experiments. but still Monte Carlo method is one of the most popular methods used for problem solving. Since these rely heavily on repeated computation of pseudo-random or random or numbers therefore. Monet Carlo method was introduced in 1940’s by physicists working in Los Alamos National Laboratory. which also gave birth to a large number of methods. it is a class of approaches that helps in solving complicated problems. cellular structures and disordered materials can be easily solved using these methods. The popularity and use of Monte Carlo methods increased considerably after the introduction of computers in 1950’s. USAF and The Rand Corporation were among the major organizations which started use of Please read update at http:://www. These approaches follow a defined pattern which includes defining the domain of possible inputs. If you are familiar with the term “what if” scenario. then you should note that Monte Carlo methods are totally opposite of “what if” scenarios.mathfinance. Instead. Today. Monte Carlo is not a single method of problem solving. so what is indeed a Monte Carlo method? as this post is just a general introduction for beginners like me.Monte Carlo Methods for Beginners Biao has writen several posts on Monte Carlo simulation method for option pricing and risk analysis. The basis of this method is the probability theory. they are better suited for calculation by a computer. these methods are being widely used in oil as well as space explorations. please skip if you are familiar with it. These simulations or methods consider random sampling of the probability distribution functions as inputs to produce thousands of results.

For more technical posts.cn 79 .these methods in their day to day operations. please search "Monte Carlo" in this blog.monte carlo Please read update at http:://www. Variance reduction by antithetic variable.mathfinance. For instance. Tags .

The way shared today is distinct from the three approaches. calculated value will always be smaller or bigger than correct value. and the adaptive mesh model. adjusting for nodes not lying on barriers. as demonstrated below. positioning nodes on the barriers. the barrier option value converges very slowly as the number of tree or lattice levels increase. Interested readers please refer to chapter 20. with severe periodic spikes that move away from the correct result. The reason for this is that the barrier being used by the tree is generally different from the true barrier value.cn 80 . thereafter called Barrier Option Pricing Using Adjusted Transition Probabilities. from page 467 to 472. which exhibits increased convergence to the analytical option price. where true barrier shall be used. the nodes of the tree lattice.Barrier Option Probabilities Pricing Using Adjusted Transition One big issue of pricing barrier option with Binomial tree or other lattice method is its slow convergence rate.mathfinance. source from paper Barrier Option Pricing Using Adjusted Transition Probabilities Please read update at http:://www. the 5th version.ederman. often requiring unattainably large computing times for even a modest accuracy. unlike traditional methods to ensure convergence through placing the barrier in close proximity to. futures and other derivatives. this method applies a suitable transition probability adjustment. John Hull presents three approaches for overcoming this problem. or directly onto. namely. A typical plot of barrier option binomial tree results against its analytic value looks like source from paper Enhanced Numerical Methods for Options with Barriers where the pricing performance is in a sawtooth fashion. etc downloadable at http://www. for example. Or read another paper in detail "Enhanced Numerical Methods for Options with Barriers" by Emanuel Derman. no matter inner barrier or outer barrier is chosen in practice. which is a nightmare for a researcher because adding more steps doesn't necessarily mean to yield a more accurate answer.pdf.com/new/docs/gsnumerical_methods. Options.

mathfinance. binomial Please read update at http:://www.cn 81 .aspx Tags .com/KB/recipes/ Zeppelin_Barrier_Options1.codeproject.cfm?abstract_id=964623 and check the accompanying C++ codes at http://www.com/sol3/ papers.Please read the paper for detail at http://papers.barrier .ssrn. option .

it is important for you to develop the skill set and the mindset needed to be a good stock trader.Stock Trader Report Every stock trader is well aware of the fact that anything and everything is possible in the stock market. risk avoiders etc.cn 82 .mathfinance. He buys share only to sell them and not to keep them. reactive. No rocket science is involved in stock trading. than you will surely come out with flying colors. Even though stock trading requires huge risk. Download the most recent free reports at the free report section.trading Please read update at http:://www. A good stock trader is one who knows how to balance the capital appreciation of shares with the dividend and bonus that he will get on those shares. A stock trader has a profit motive in mind and thus. Portfolio plays a very important role in the world of stock market and dividend or bonus helps to increase the portfolio considerably. pro active and knows and analyze the market very well. good decision maker and observer can excel and do well in this field. Before entering into stock trading. still you will find many people seriously indulging into it. A stock trader is least interested in keeping shares with him. he tries to maximize the worth of his shares by trading them. a person who is knowledgeable. Unlike traditional stock investors who used to be uneducated. Every trader trades for the shares for the purpose of capital appreciation. Stock trader reports will give you a brief idea of what stock trading is all about and what factors you should keep in mind when you are dealing in stocks. Today. This field offers ample opportunities and if you are willing to devote time and effort. A stock trader is a person who buys or sells share of companies at various stock exchanges. majority of the stock traders are risk takers. Tags .

It is assumed that at each step the value of underlying instrument is either moving down or up by a specific factor. It is slower. The option value which is obtained is called the exercise or intrinsic value. The down and up factors are calculated using underlying volatility. This method traces the evolution of options underlying variable spread over a period of time. I will be mainly writing introductory articles. Tags .cn 83 . Each node in the binomial tree or lattice represents price of the underlying at a single point of time. i.binomial Please read update at http:://www. BOPM follows a three step process. by moving backwards from the final nodes. and I will try to link to other technical posts for a better understanding if possible. it starts from the final node and goes backwards till it reaches the first node. In the first step. This method is popular in the sense that it can be used for variety of conditions. which is binomial tree generation. Cox and Ross. which aims to help beginners have a rough idea. unlike biao's technical posts. This is done by using a binomial tree or binomial lattice. Binomial options pricing model or BOPM. as it is popularly known is a generalized numerical method that is used for the valuation of options.. a guest author of the math finance blog. but much more accurate than any other method. The main reason why it can be used in varied situations is that it is based on the underlying instrument spread over a period of time rather than a single point of time. The next step is to find the value of option at each final node. Check Nine Ways to Implement Binomial Tree Option Pricing for binomial tree implementation. The valuation is performed iteratively.mathfinance.Binomial Tree This post is by Bo.e. This method was proposed by Rubinstein. a tree comprised of prices is produced by working forward the date of valuation to expiration. The third step is to find the value of options at earlier nodes. The value that you will calculate in each node of the binomial tree is the value of the option at that point of time. while the other numerical methods have limited use.

Gamma. an investor needs to know and fully understand the potential risks of the investment prior to committing capital to that investment. respectively. In the options market. delta. and Theta. No matter what the investment. Commonly used Greeks include Delta. the Greeks define and quantify the risks of your position before you commit to the investment. Obviously a good risk control depends largely on how accurate the way a trader or risk manager compute Greeks. an investor should never commit hard earned money. see old post Option Greeks analysis for nice Matlab files plotting Greeks for vanilla options. Without a full understanding of the risks of an investment. which represents partial derivative to underlying asset price. but also which specific options to use to create that specific strategy. interest rate and time to maturity. the Greeks can also help you identify and select not only the proper strategy to fit the opportunity you selected. Tags .mathfinance.greeks Please read update at http:://www. Further.How much do you know about the Greeks? Option Greeks measure the sensitivity of option's value to a change in underlying parameters on which the value of an instrument or portfolio of financial instruments is dependent.cn 84 . Vega. Understanding the Greeks is a must for proper risk management. you have no business being in the options market! Watch this complimentary seminar covering the Greeks… Option Greeks seminar. Rho. If you do not know your Greeks. volatility.

Mathematics is everywhere in a mathematician's eyes.Mathematics is everywhere Share a few interesting pics taken by Nikki Graziano.de/impulse/2010/03/24/ mathematische-funktionen-fur-jeden-geschmack-0017020 Tags . a photographer and a mathematician.cn 85 .thejunction. Source from http://www.math Please read update at http:://www.mathfinance.

halton and sobol sequences and Sobol and Generalised Faure sequences. very impressive. A recent working paper shared at Articles uses a small trick . However.com/sol3/ papers. it can never be more efficient than the ordinary Monte Carlo simulation.cfm?abstract_id=1558186 Tags . some researchers suggest to use Sobol sequences with Brownian bridge for a better result. Below is a comparison graph demonstrating the performance. among those low discrepancy sequences. pricing a pathdependent exotic option.sobol Please read update at http:://www.High Dimensional Sobol Sequences Quasi-Monte Carlo methods are very efficient in solving low dimensional integration problems. how to generate Sobol Sequences was shared at posts Sobol sequence generator.cn 86 . empirical research have shown Quasi-Monte Carlo Sobol sequences perform poorly for high dimensional integration problems.ssrn.mathfinance. Primitive polynomials for Sobol sequences. indeed it is straightforward to add this trick into your codes. Sobol is undoubtedly one of the best and most widely used due to its high convergence speed. for example. http://papers.randomized Sobol sequences to avoid the poor performance high dimensional problem. (Source from A note on multidimensional sobol sequences) read the paper for detail if interested.

9:00 a. (Central european Time) 9:00 a.S.Upcoming Webinars by MathWorks Attending a free webinar is a good way to learn efficiently. (U. (U. EDT) 9:00 a.m.mathfinance.m.m. Date Title 24 Mar Data Acquisition with MATLAB 2010 6 Apr Global Optimization 2010 Products with MATLAB Session Time 10:00 a. (United Kingdom-GMT) 2010 Computational Finance Enjoy. 8 Apr Digital Signal Processing Using MATLAB EDT)2:00 p.webinar Please read update at http:://www. (U. Tags .S. Here is a list of upcoming one-hour live online webinars about MathWorks products which I think useful to math finance studying.m. (U.m.m.S.S. 2010 EDT) 13 Apr Best Practices for Verification. EDT) 15 Apr MATLAB for Excel Users in 10:00 a. EDT) 2010 and Test in Model-Based Design 2:00 p.S. (U. Validation.m. (U.m.S. EDT)2:00 p.cn 87 .

the new binomial tree is not recombined any more.mathfinance. so basically what we need to do is to construct a tree like usual before ex-dividend date. (source from Options. Please read update at http:://www. how to deal with discrete dividend with a binomial tree is explained in detail. namely.cn 88 . where future discrete dividend is divided into two types: 1. Escrowed dividend model. In the book Options. when i = k+m. fifth version. the whole nodes are shifted down by 2. especially when the number of dividends is large. Bos volatility adjustment model. and Other Derivatives. I didn't include lattice method for comparison because nonrecombining binomial tree is computer intensive. and Haug. there is a simpler way to get around of this difficulty by dividing the stock price into two components: an uncertain part and a part that is the present value of all future dividends during the life of the option. Futures. known dividend yield. For instance. as pointed by Hull.Binomial Tree Option Pricing with Discrete Dividends How to value a stock option with discrete dividend was briefly introduced at http://www. Please check the book for detail Options. it is straightforward to handle it as the binomial tree is recombined when the nodes are multiplied by a percentage. Fortunately. known dollar dividend. where the main goal is to compare the performance of different methods. For instance. futures and other derivatives by John Hull. there will be a 2. there are m(k+2) rather than k+m+1 nodes. Chriss volatility adjustment model. which means much more nodes than the non-dividend case. The issue becomes more challenging when we increase the number of dividends. Haug & Haug volatility adjustment model. and then a new binomial tree is constructed. and then shift all the left tree nodes down by (1-dividend yield).5 dollar dividend 3 months later.mathfinance. there will be a 3% dividend 3 months later (3% of the stock price).cn/valuation-of-stock-optionwith-discrete-dividend/. that's it. so before ex-dividend date the binomial tree is constructed as usual but exactly at the date after ex-dividend. futures and other derivatives) 2. the number of nodes are the same as for non-dividend binomial tree. 7th Economy Edition with CD. Haug and Lewis method.5 dollar. see page 402. Specifically. because the nodes are shifted by an absolute amount number.

Tags . futures and other derivatives) Should you are interested into a sample implementation in Matlab of Binomial Tree Option Pricing with Discrete Dividends.(source from Options.ualberta.cn 89 .dividend .5/ toolbox/finance/finance/binprice.ca/dept/aict/bluejay/usr/local/matlab-6. option Please read update at http:://www.m. take a look at the file http://www.mathfinance.

you are my man. . data clean. missing data imputation for a small hedge fund.quant Please read update at http:://www. Although we can't guarantee we are capable of meeting all your requirements. an American option calculator considering discrete dividends in VBA. you are definately on my list if I need a quick quant. Some selected customers' review: Very satisfied. you may consider to give my group and me chance. for example. If I ever have the need for a quant to help with another custom function.cn (remove space) for a quote and proposal if you want. etc. we can try best to insure you a satisfied result as long as we promise to undertake the project.mathfinance. cheers. Please email me at abiao @ mathfinance. Tags . courses. probability of future stock price exceeding a barrier in Matlab. some recent projects including a portfolio Value at Risk calculation excel with macro supporting advanced input & output form.muzammmil Fantastic effort abiao. . at a low cost.cn 90 .John with received feedback If you happen to have some math finance projects for outsourcing. In the mean time I also did a few outsourcing projects. I really appreciated you turning this job around for me so quickly. with the level of work .ABCInvestor Thanks for your efficiency.Quant Project Outsourcing I haven't updated my blog for several days as I have been very busy last week with my own research.

and how shareholder demand for profit forced investment executives to eat the forbidden fruit of toxic derivatives.S. considering the high quality of Liar's Pocker. where the author Michael Lewis described his experiences as a bond salesman in a humon sense. I pre-ordered just now at Amazon. Who better than the author of the signature bestseller Liar’s Poker to explain how the event we were told was impossible—the free fall of the American economy—finally occurred. were vehicles for that crash.09 at Amazon to be released on March 15. like ridiculously easy money and greatly expanded home ownership. if you also want a bed reading book. 2010.cn 91 . Tags .mathfinance. book Please read update at http:://www. Truth really is stranger than fiction. economy was driven over the cliff. it may be worth reading. one of the books that define Wall Street during the 1980s and are highly recommened by many people in academia and industry.The Big Short: Inside the Doomsday Machine Most of us have read the book Liar's Poker: Rising Through the Wreckage on Wall Street. I just got to know today from a friend of mine recommending a new book The Big Short: Inside the Doomsday Machine .amazon . as described: Quotation A brilliant account—character-rich and darkly humorous—of how the U. The Big Short: Inside the Doomsday Machine. order one at only $15. I don't know. how the things that we wanted.

http://papers. heuristic Please read update at http:://www.com/ sol3/papers.stochastic . Finding parameters that make the models consistent with market prices means solving a non-convex optimisation problem. However. Optimisation heuristics is suggested for this issue. Heston model. the calibration process is difficult because generally the pricing requires numerical integration. Take a look if you are interested.cn 92 .cfm?abstract_id=1566975 Tags . Found a paper Calibrating Option Pricing Models with Heuristics. and calibration requires to find five and eight parameters instead of only one for Black Scholes model. specifically. in the Appendix the R and Matlab codes are given for a better understanding.ssrn.Calibrating Stochastic Volatility Models with Heuristic Techniques Stochastic volatility models. where the author look into the calibration of Heston (1993) and Bates (1996) models. are introduced before and become the widely used among academia and industry. more specifically they show that Differential Evolution and Particle Swarm Optimisation are both able to give good solutions to the problem. SABR model.mathfinance.

and the Popgun.How to Spot Trading Opportunities How To Use Bar Patterns to Spot Trade Setups 30 Instructional Charts With Simple Explanations If you are a trader or are the least bit interested in trading. How to Use Bar Patterns to Spot Trade Setups." which adds two more important patterns: the Three-In-One Bar Pattern and the Outside-Inside Reversal. you're most likely "chart-centric. "How to Make Bar Patterns Work For You. You'll learn to identify and capitalize on bar patterns such as the Double Inside Day. But without the right education. Tags . And you'll get a brand a new addition to the original report.trading Please read update at http:://www. can help.mathfinance. the Arrow. you could be missing high-probability trade setups that should be staring you right in the face. That's where our FREE report. Download Your Free Bar Patterns Report Now." A good chart is priceless if it helps to identify a great opportunity.cn 93 .

HS is still popular due to its obvious advantage: easy to implement. We know one shortcoming of historical simulation is: the result highly depends on the choice of sample data length. They even compare their performance with the first one above and the results are: source from INCORPORATING VOLATILITY UPDATING INTO THE Please read update at http:://www. a third post about using historical simulation for Value at Risk calculation. and use historical simulation on the adjusted returns. Their argument is supposing today's volatility is 20%. and no distribution assumption required. 1. The idea is to "adjust" return based on the ratio of current volatility to the past volatility. The following results are from the paper The Best of Both Worlds: A Hybrid Approach to Calculating Value at Risk. Matthew Richardson and Robert F. It does improve compared with the vanilla historical simulation and EWMA parametric method. 2. page 11. The Best of Both Worlds: A Hybrid Approach to Calculating Value at Risk by Jacob Boudoukh1. while volatility was say. here are two selected methods with good results I personally use. 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.VaR Historical Simulation Following Value at Risk xls and var backtesting. then past returns obviously exaggerate the current market situation if used directly. hence improves the backtesting performance of parametric method. VaR result does not vary often or changes suddenly. INCORPORATING VOLATILITY UPDATING INTO THE HISTORICAL SIMULATION METHOD FOR VALUE AT RISK by John Hull and Alan White.mathfinance. Whitelaw. By hybrid it means this approach is a combination of RiskMetrics's parametric method and Historical Simulation. 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. which is especially appealing if the estimate of distribution assumption is difficult. 30%. Despite this weakness. Several ways have been proposed to improve HS's performance.cn 94 . nice.

mathfinance. Results are promising.var Please read update at http:://www.HISTORICAL SIMULATION METHOD FOR VALUE AT RISK page 17. Tags .cn 95 . aren't they? few lines of codes are enough for the adjustment.

5. Testing for Asymmetric Dependence.com/sol3/ papers. Tags . Index-Exciting CAViaR: A New Empirical Time-Varying Risk Model.cfm?abstract_id=1559642. just a final kind remind. 2.cn 96 . Trading Activity and Bid-Ask Spreads of Individual Equity Options. I have been updating Friday reading list on page articles. http://papers.bepress. 4.com/sol3/papers.com/ snde/vol14/iss2/art2/.mathfinance. 3. http://papers. http://www.ssrn. http://papers.com/sol3/ papers. the list of this week includes: 1.cfm?abstract_id=1561185 Keep an eye on page articles.friday Please read update at http:://www.Friday reading list of this week Friday again.ssrn.cfm?abstract_id=1553222. The Method of Simulated Quantiles. since Change of Friday Reading List Setting. Improving Portfolio Selection Using Option-Implied Volatility and Skewness .ssrn. for example.bepress. http://www.com/snde/vol14/iss2/art1/.

if you write an equation: you would get a graph below: Creat your own calculator.com/inverse-graphing- Please read update at http:://www. where you enter any word from A to Z into your calculator and then get a graph of the curve.php Tags .xamuel. For instance.cn 97 .Inverse Graphing Calculator An interesting application of Inverse Graphing Calculator.mathfinance.graph at http://www.

(most of us may have a wrong impression that Sudoku originated in Japan.solve the problem in matlab.X) <.uk/company/newsletters/news_notes/ 2009/ clevescorner. Since building a GUI in matlab isn't easy. write down a 9*9 matrix "X" then define a zone to fetch the calculation result. in America.co. "send data to matlab". "retrieve data from matlab". respectively.html?s_cid=ACD0210ukTA2&s_v1=8728847_1-BR7DSN. MLPutmatrix("X".mathworks. the minor error is it doesn't report an error when the initial 9*9 matrix you give violates Sudoku rules (you can test it later.get results from matlab. Once you install Excel Link module and turn it on. the code starts to run and returns a result even you give repetitive numbers along a same row or column). I save one copy at my gphone and play it whenever I want to take a rest. For my case."NewX") result is then retrieved immediately to Sudoku Spreadsheet from matlab Please read update at http:://www. those buttons stand for "start matlab".Sudoku Spreadsheet Example of Matlab Excel Link Sudoku is one of my favorite small games I often have fun with. I first download the Sudoku M code at http://www. I choose to build a Sudoku spreadsheet using Matlab Excel link for an example.cn 98 .) I happened to find Cleve Moler solved Sudoku using recursive backtracking method and the speed is fast. MLEvalString("X=sudoku(X)") <. you will notice the short-cuts on the excel menu bar looking like intuitively.mathfinance. which should also be 9*9 finally do steps: <. and "execute the matlab command". then open an excel file. no. MLGetMatrix("X".put data to matlab.

matlab .mathfinance.cn 99 . isn't it? alternatively you can use Matlab builder for excel.Straightforward to run your Matlab function in excel. excel Please read update at http:://www. Click to download Tags .

this movement facilitates my sharing process. for another. please consider sharing to your friends if you think this blog is useful by bookmarking at the right sidebar button or linking to us if possible. I do appreciate your 10 seconds support. since not all people like reading technical paper. So from now on all recommended paper. Tags . which is especially a benefit to blog feed readers as the reading list will "disappear" from update.cn 100 . I don't have to add paper/articles to my reading list only on Friday. which can be easily seen above at the menu bar. Also. For one thing. will not be shown on the main page any more but rather under separated Articles category .Change of Friday Reading List Setting I made a small change to the Friday reading list section by adding a new category Articles.mathfinance. together with shared interesting articles.friday Please read update at http:://www. they can now choose not to see them at all. Have a nice weekend.

three-part Club EWI video series "Why Use The Wave Principle.. namely: "An investor is lured into the market at just the worst time. Wayne recalls this expression from a famous. Sri Lanka. the market for the most part ROSE. and environmental events failed to alter the course of their respective markets. the mainstream financial world has embraced the view that external news events drive trend changes in the markets." Wayne first assesses the pitfalls of relying on macroeconomic models to forecast.i. Four out of the five ROSE after the natural disaster. Stock market charts of the five countries most affected by the 2004 Indian Ocean Tsunami (India. The Dow Industrials and GDP quarterly data from 1970 to early 2000s: After the release of major negative GDP numbers. and Thailand).cn 101 .mathfinance. The Dow and profound political events over the last 80 years: In the 1930s and 1940s. In his myth-busting.. EWI's senior tutorial instructor Wayne Gorman shatters that very idea into a fine dust. Believe it or not. when it's time to sell. World War II. a series of negative incidents -. we've only scratched the surface. free video "Why Use The Wave Principle. In part one of his exclusive. Indonesia. Hitler rising to power. Wayne spans three hundred years of financial history to reveal how the most pivotal economic.preceded a powerful uptrend in stocks all the way into the 1960s. Nobel Prize winning economist: Please read update at http:://www. and forced out just at the best time to buy." Wayne Gorman presents a total of 40 charts that capture failed fundamental analysis of the world's leading financial markets. the free video includes groundbreaking charts on these (and more) well known episodes: The S&P 500 and Enron from 2000-2002: The stock market ROSE and continued to proceed upward AFTER the largest US corporate scandal and bankruptcy ever (at the time). Here. In less than ten minutes." As for real world examples of this happening. swept away into thin air. just the opposite of what most market analysts and investors expect.Free market reports and articles For over ten decades. and the Holocaust -. political.e. Malaysia.

cn 102 . one that will help us to avoid the pitfalls shown on the previous charts." The flaw in Economic 101. But it's also one of the hardest things for many investors to accept. That's why the Wave Principle is so important.report Please read update at http:://www. Simply sign on to join the rapidly expanding Club EWI and take advantage of the amazing educational benefits membership has to offer. It offers a unique perspective and a market discipline of rules and guidelines that help investors avoid buying at tops and liquidating at bottoms." And he offers this response: "But isn't that what we have in financial markets: cases of uncertainty? We need a different type of reasoning.mathfinance. Tags . Now is the time to do so." video in its entirety today at absolutely no cost. Watch the free "Why Use The Wave Principle. It helps to explain and understand trends before they happen. cause-and-effect theory is one of the easiest things to prove."Economic reasoning will be of no value in cases of uncertainty.

but for a portfolio we have to be careful with the trading positions.var Please read update at http:://www. 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).cn 103 . I simply didn't add that in an excel for speed reason. certainly there isn't only one way for VaR backtesting.VaR Backtesting A follow-up of my previous post Value at Risk xls. The Backtesting framework developed by the Basel committee is the main methodology to judge the performance of VaR model. 1996 look like Backtesting results can therefore be judged by counting the number of exceptions and seeing intuitively which colour zone it falls into. the backtesting three zones boundaries for a sample of 250 observations. Obviously. 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. Your final VaR backtesting results will look similar to by which you are able to tell the performance of your VaR model. it is straightforward in principle to do that but since we have to calculate daily VaR for multiple periods in order to do backtesting. Alternatively you can rely on some statistical testing. the exception testing by Kupiec (1995). for instance. Basel committee (1996) introduces a three-zone approach. I was asked why not & how to add a VaR backtesting module in that excel file. red zone means the probability of erroneously rejecting an accurate model is remote. the ideal model should generate the times of VaR exceeding P&L equal to (1-alpha) multiplied by time periods for backtesting. source from Basel committee. For a single equity case it is obvious what we need to do is comparing daily VaR results with daily return. For example. well. Tags .mathfinance. the abovementioned one is an example.

accrued interest. For example.htm if interested.. forward price and repo rate.ch/FinCalc/Index. bond cash flows. excel Please read update at http:://www. after downloading FinCalc. value at risk. caps & floors. exotic options. unfortunately. Excel add-in and examples to download. a user is able to use the following modules: The author protects the macro code with password. Interest rates derivatives: valuation and sensitivity for swaps. options and interest rate derivatives. Portfolio analytics: volatility. User friendliness: meaningful function and parameter names. money market. Derivatives: valuation functions and sensitivity measures european and american options. Bond analytics: yield to maturity. FinCalc. user's manual.hispeed. Check http://homepage. futures.. Credit derivatives: valuation and sensitivity for CDS. duration. opening it and other files saved in a same directory.FinCalc covers bonds.swaptions. Tags .xla. numerous examples and applications. as introduced by its webmaster: "FinCalc provides you with the tools to build advanced financial functions under Excel. valuation functions and sensitivity measures. Discount curve construction based on money market rates.risk .short term futures and swap rates. expected return. .Financial Analytics Risk Management Tools Found a site providing financial analytics & risk management tools.cn 104 ." Key points are: Calendar with business holidays for the major financial centers. portfolio optimization on an absolute basis or relative to a benchmark. tracking error.mathfinance.

Due to the simplicity and speed of our binary options trading system and the low minimum investment amount. the next step probably is to trade binary options. At EZtrader you can trade Binary Options. where the payoff is either a certain amount of prescribed cash. very different from traditional option trading. cash-or-nothing option holders receive cash if the option finishes in the money. Please read update at http:://www. dynamic and highly profitable trading platform. EZTrader developed a system suitable to most of everyone's goals. The pricing of binary options is straightforward under GBM framework. called cash-or-nothing option. it is able to reach investors with different profiles all over the world. Why do I select this online trading service? well. or shares.mathfinance. by supplying its customers with a simple. Dow Jones and Commodities based options. There are several online option trading platform for an individual investor to choose.cn 105 . thereafter binary options are often named as digital options. Once we understand the principle and know how to price it. you don’t have to leverage millions of dollars with every trade or setup complicated stop loss strategy. called asset-or-nothing option. who has revolutionized the way binary options are traded on the internet today. With binary options you simply choose whether the stock price will go up or down by the expiration time and place you call or put accordingly. EZtrader have taken the fear and uncertainty out of Forex trading to focus on an existing new kind of trade. the one I'd like to review is EZTrader. Ranging from sophisticated investors that are looking for ways to hedge their positions in the traditional market. there are at least the following advantages of EZtrader I am aware of: . With EZtrader binary options everything you need is right in front of you. to amateur day traders looking for some "action" without risking large amounts of money. asset-or-nothing option holders receive shares of asset if in the money. Intuitively. the widely used Black Scholes formula can be easily adopted for binary option valuation.A member is able to trade Nasdaq. exciting. With EZtrader your winning return is fixed.Binary Options Trading Binary option is a one of the simple & common type of derivative.

Simple & new binary options trading platform.mathfinance.cn 106 .Members can choose to withdraw fund as they want. then select the type of trade. you will find a pool of options to choose Choose an option to trade from the list of available options. trading Please read update at http:://www. To start trading. Monday.. one promotion is: If you deposit a total of $550. finally click 'Trade' to execute your trade. Besides simplified trading process. Tools include live financial news. start applying your derivative quantitative skills directly at EZTrader. absolutely No Fees. EZTrader members are provided with a complete set of tools to help them optimize their trading. . references to financial sites and a wide variety of tradable options. and more. option . February 22nd.Hourly trades.. .00 today. . for example. first go to trading area after sign in. Tags . 2010..binary . either CALL or PUT.00 (%45)Registration is totally free and there are no commissions to pay ever.Open an account is free. enter the amount you would like to trade. you will receive a bonus of $250. you can change the trade type from CALL to PUT or vice-versa even after entering an amount. Check EZtrader home page regularly for new promotions that will help you to get the most out of your trades.

you have to make sure internet is accessible for downloading data from Yahoo. too simple assumption or too exotic to implement. • HS – easy to implement. So this afternoon I created a naive excel xls file with VBA macro code available. – highly depends on the choice of sample data length. • MC – flexible. Please keep in mind this file is created for illustration only. a short comparison of the above-mentioned three approaches are listed below. use at your own risk.cn 107 .Value at Risk xls A blog reader wrote me an email few weeks ago regarding if it is possible to share an excel for Value at Risk xls calculation. – assumption of risk factors return required. Please read update at http:://www. not hard to understand. • Parametric – easy to implement. almost suitable for any distribution. – assumption of risk factors return required. VaR and ES can be easily calculated by the definition. sorry for that. Value at Risk is computed by delta-normal. I didn't notice that email until recently. no distribution assumption. Mina and Xiao (2001) explains in detail three popular methods to compute VaR: parametric approach (the simplest one is delta-normal). time consuming. once distribution is known. VaR result does not vary often or changes suddenly. the crucial point for quantile estimation is to find a suitable distribution of underlying risk factors. Attached is the ValueatRisk. I am not going to talk in detail how to calculate them as interested reader can refer to the paper or the book by John Hull. Before checking the excel.xls file. where for simplicity. few sentences explaining Value at Risk calculation are necessary: Value at Risk (VaR) is the maximum loss not exceeded with a given confidence level 0 Given confidence level and horizon day. I treat volatility as normal standard deviation. Monte Carlo simulation (MC) and Historical simulation (HS). monte carlo simulation and historical simultion for any single equity.mathfinance.

To use it. cheers. Please let me know any error. Excel: Click to download Macro Code: Click to download Tags . you need to fill in several parameters including: where you can change stock symbol "IBM" to any stock you want.var Please read update at http:://www. as long as its trading prices are available at Yahoo finance.mathfinance.cn 108 .

Market Timing & Trading Strategies Using Asset Rotation. "This paper develops a method for the exact simulation of point processes with stochastic intensities.ssrn.com/sol3/ papers. "The mean-variance portfolio weights are known to be strongly affected by the estimation errors of the parameters of asset distribution. "In this paper.ssrn. Exact Simulation of Point Processes with Stochastic Intensities. We distil the stability measurements of separate coordinates of portfolio weights estimator into a single number. Our paper studies this phenomenon from a new angle." http://papers.cn 109 . We derive analytical formulas that relate this measure with the mean and the covariance matrix of asset returns.ssrn.cfm?abstract_id=1537914 2.com/sol3/papers." http://papers. A hedging example based on VIX futures is used to demonstrate its flexibility and superiority against the conventional OLS regression approach. "We show that stocks that experience a sudden increase in idiosyncratic volatility earn abnormally high contemporaneous returns but significantly underperform otherwise similar stocks in the future.com/sol3/papers. Hedging the Black Swan: Conditional Heteroskedasticity and Tail Dependence in S&P500 and Vix.cfm?abstract_id=1362121 5.Friday reading list 19/02/2010 1. Unusual News Events and the Cross-Section of Stock Returns. "In this paper we present empirical results on the statistical and economic viability of a market timing trading strategy that is based on rotation between two risky assets." http://papers.com/ sol3/papers. The method is based on a change of the filtration that describes the information flow in the point process model." http://papers.friday Please read update at http:://www.ssrn.ssrn.cfm?abstract_id=1553073 4.com/sol3/papers. Stability of Mean-Variance Portfolio Weights.cfm?abstract_id=1551647 Tags .cfm?abstract_id=1549164 3. We use data on Exchange Traded Funds (ETFs) and models for both the returns and the volatility of the underlying assets." http://papers. we show how the conditional approach of Heffernan and Tawn (2004) can be implemented to model extremal dependence between financial time series.mathfinance.

as the chart shows. 3. Indeed. Available cash does correlate with the market’s moves. not the cash. The Elliott Wave Financial Forecast issued its “cash is king” advice. Small stocks are the place to be. Bubbles can unwind slowly." Have you ever heard some stock market pundit utter these words? Have you ever wondered if the statement were true? Read this item from the latest issue of The Elliott Wave Financial Forecast. Worry about inflation rather than deflation. In December 2007. You can discover how we exposed these ideas as myths. available net cash expanded to a new high. but the market is in charge. when mutual fund cash hit 4. Jan. 2010 Now take a look at these 10 statements and decide if they are true: 1. It's bullish when the market ignores bad news. a 15-year time span. 7. 4. News and events drive the markets. 10.2% (compared to 3. Despite the presence of this mountain of cash. the word on the street is that there is way too much “cash on the sidelines” for stocks to fall precipitously.cn 110 . This refrain rang like a gong all the way through the declines of 2000-2002 and 2007-2009.mathfinance. 8. The FDIC can protect depositors. It's enough to simply beat the market. ----The Elliott Wave Financial Forecast. besting all extremes since at least 1992. Walker. you have to diversify. 5. cash remained high right as the stock market entered the most intense part of the crash in 2008. and you'll wonder no more: Myth -. and in turn make more informed decisions about your Please read update at http:://www. To do well investing. "Cash on the sidelines is bullish for stocks.8% in November). 9. In February 2000. 6. This chart shows net cash available to investors plotted beneath the DJIA.11 Commonplace Market Views: True or Myth? A guest post by Susan C. 2. 29. People can make money speculating. Bob Prechter and our other analysts have debunked each of these statements as a market myth. Once again.Cash on the sidelines is bullish for stocks. the DJIA lost more than half its entire value over the next 15 months. Earnings drive stock prices.

Tags .cn 111 .mathfinance. investment bubbles.elliott . as well as two of our books. and get your free eBook here. earnings reports. the safety of your bank deposits. inflation and deflation. speculation. and more! Protect your financial future and change the way you view your investments forever! Learn more. We've gathered the writings that expose these 10 statements as market myths in our 33-page eBook. called Market Myths Exposed. small stocks. Prechter's Perspective and The Wave Principle of Human Social Behavior. The 33-page eBook takes the 10 most dangerous investment myths head on and exposes the truth about each in a way every investor can understand.investing. You will uncover important myths about diversifying your portfolio. They come from two of our premier publications. stock Please read update at http:://www. The Elliott Wave Theorist and The Elliott Wave Financial Forecast.

namely: 3-day high/low method. Since ETF is not easily accessed for individual investors due to large amount fund requirement. multiple days up and down. R3 strategy 4. Starting with capital 12500. considering all of the 7 strategies are based on buying on pullbacks.34 and buy & hold strategy 0.01 sharpe ratio. the %b strategy 5. multiple days up and down Although all for pullbacks. Many of the concepts are derived from high probability equity trading strategies. just for preliminary research): 1. my first thought is: are these trading strategies suitable for stocks trading? At the end of the book the authors also said: "the strategies in this book are intended for ETFs. the %b strategy.cn 112 . 3-day high/low method 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. RSI 25/75. Please read update at http:://www. I wasn't optimistic about them on stocks. the graphs look ugly.5% and running for one year data. RSI 25/75 3. since shorting selling is hard in Chinese market I exercise long strategy only (which might influence their performance. transaction cost 0. compared with the best one the %b strategy 3. 3-day high/low method did worst with only 0.High Probability ETF Trading Strategies on Stock Finally finished reading the book High Probability ETF Trading: 7 Professional Strategies To Improve Your ETF Trading bought few weeks ago. I tested 5 strategies out of 7 for a randomly selected Chinese stock downloaded from Yahoo. R3 strategy generates 2. in the book the authors share 7 professional quantitative trading strategies to improve ETF trading. the authors also note "ETFs tend to move from overbought to oversold better than individual stocks". and RSI 10/6 & RSI 90/94 strategy. the results are (pls bear with me. I admit).74.mathfinance. R3 strategy. In addition. but stocks have very different risks than ETFs".

Anyway. trading Please read update at http:://www. we must test seriously before applying these strategies to non-ETF assets.mathfinance. as the authors mentioned.strategy .cn 113 . especially for breakout type assets. Tags .

"In this paper. the pricing formula for a European call is then given by inverse transform of the derived characteristic function.com/sol3/ papers. "This paper illustrates the advantages of a model pooling approach in contrast to model selection. and the Carhart (1997) four-factor model are considered for the purpose of forming expectations (i.cfm?abstract_id=1547036.ssrn. 3. Please read update at http:://www.cfm?abstract_id=1548408. 抬板凳看春晚 1." http://papers.. 2. This model can generalize the time-varying correlation structure in Tse and Tsui (2002) by determining a natural grouping of the correlations among the series.ssrn.Friday reading list 12/02/2010 Tomorrow is the last day of this lunar year. Comparison of Numerical and Analytical Approximations of the Early Exercise Boundary of the American Put Option. wish all of you and me happy Chinese lunar new year.com/sol3/ papers. Modeling the Cross Section of Stock Returns: A Model Pooling Approach. As long as the characteristic function with piecewise-constant parameters is analytical known. 4. Efficient Derivative Pricing by the Extended Method of Moments. predictions) of the one-step-ahead returns for a cross section of stock portfolios. I address systematically how to enhance the most existing option models with piecewise-constant parameters.ssrn.com/ sol3/papers." http://papers.e.cfm?abstract_id=1547783. Discrete Jumps and Regime-Switching.mathfinance. "This paper proposes a new clustered correlation multivariate GARCH model (CC-MGARCH) that allows conditional correlations to form clusters.com/sol3/papers. "In this paper we present qualitative and quantitative comparison of various analytical and numerical approximation methods for calculating a position of the early exercise boundary of the American put option paying zero dividends.cn 114 .ssrn. Option Pricing with Piecewise-Constant Parameters. Multivariate GARCH Models with Correlation Clustering. and how to derive the corresponding closed-form characteristic function under the risk-neutral measure. the Fama-French (1993) three-factor model. "The local conditional moment restrictions are of special relevance in derivative pricing for reconstructing the pricing operator at a given day.cfm?abstract_id=1536050." http://papers. Model pools of several asset pricing models including the CAPM." http://papers. 5.

friday Please read update at http:://www." http://papers.ssrn.by using the information in a few cross-sections of observed traded derivative prices and a time series of underlying asset returns.com/sol3/papers.cn 115 .cfm?abstract_id=1550135. Tags .mathfinance.

Its staff of full-time analysts provides 24-hour-a-day market analysis to institutional and private investors around the world. Elliott Wave International have brought back one of their most sought after free resources for one week only. PS: forgot to mention. don't miss out on this rare second chance. in order to download the free report. the registration requires only username and email address.mathfinance. Some of the most interesting chapters include: * Why Emotional Discipline is Key to Success * When to Place a Trade * How to Use Bar Patterns To Spot Trade Setups * How To Calculate Fibonacci Projections * The Best Place for High-Opportunity Trade Setups * You'll find several more fascinating lessons -. the price will be back to normal $59 after that day for all blog readers. The Best of Trader's Classroom eBook is free through February 16. the world's largest market forecasting firm founded in 1979 by Robert R. The Best of Trader's Classroom eBook serves up the very best lessons from their popular -and expensive -.14 Critical Lessons Every Trader Should Know A post from our blog sponsor. Elliott Wave International. Tags . Prechter Jr.14 in all To download the free 14 Critical Lessons Every Trader Should Know. If you aren't one of the thousands who downloaded this valuable resource in its original release. Cheers.Trader's Classroom Collection in one valuable 45-page report. elliott Please read update at http:://www.cn 116 . you need to get your free report by February 16.trading . which takes half a minute. From today. you have to be a member first.

but I do appreciate any comment or hint or suggestion. trading strategy.cn" (remove space). you get an update about the progress of the topic also attracting you from period to period. applicable as a thesis topic.mathfinance. Do you happen to have an interesting topic that you or your colleagues want to work on while without enough time and resources? then probably you are able to help me by telling me what the topic is about to "abiao @ mathfinance. I know it is hard to find a topic in this way. 3. The topic needs to be: 1. a problem is solved hopefully. Please read update at http:://www. 2.cn 117 . but later on I realized the potential margin contribution is small with more knowledge on this field. about derivative pricing (equity. I find a sexy research topic to kill my boring overseas doctor life. indeed a few latest paper dealing with this issue already. initially I chose to research on convertible bond underpricing considering multiple features other paper might fail to do so. especially from industry side. portfolio construction or quantitative risk analysis. fx or IR). 2. The benefits for both of us: 1.Research Topic Wanted I have been struggling to find a suitable research topic for my PhD in finance these days.

call barrier 12. call price 110. The exact computational time depends on the time steps and asset steps. since Quadrature has a higher order of convergency rate. it is several times faster than finite element. in my case. Tags . strike 10.Quadrature method for convertible bond pricing A follow up post of my previous entry Using Quadrature method for option valuation. PS: the y-axis should be relative error.cn 118 . finite element method) numerical solutions. convertible bond Please read update at http:://www. but generally speaking. below is price performance comparision under Quadrature and PDE (specifically. Quadrature costs me less than ten seconds but finite elements costs me around one minute.quadrature . risk-free rate 2%. where the CB has time-to-maturity two years. Today I play the Quadrature method for a vanilla convertible bond. for example. still. the results are promising. where the accuracy and computational speed are demonstrated briefly with a simple European option based on the paper "universal option valuation using quadrature methods".mathfinance.

I didn't promise at the beginning worrying the video has nothing to do with my topic. so please skip it if you have no interest at all. Dolphin is among the most intelligent animals and its often friendly appearance and seemingly playful attitude make it popular.mathfinance. PS: my friend is glad to add how happy he is after knowing Chinese government imposed a law recently against eatching dog meat in China. it is under increasing human threat. like many other animal species. as mentioned in Wikipedia.Dolphin in Taiji This post has nothing to do with quantitative finance. it is in English and with Chinese scripts. I once read an article saying dolphin is as smart as an average three years kid. take a rest then. a touching story worthy to think about. Below is the video. from now on it is illegal. but decide to do so after watching it. asked me if it is possible to embed a video on my blog. "In some parts of the world such as Taiji in Japan and the Faroe Islands. however. in addition. A friend of mine. and killed in harpoon or drive hunts." The video tells us how cruel the fishermen in Taiji are. A great step. who is an active animal protectionist. 90 minutes long. dolphins are traditionally considered as food.cn 119 . Tags . today is Sunday.dolphin Please read update at http:://www. how the activists hope to save dolphin but fail.

com/sol3/ papers.ssrn. efficiency and reliability. http://papers. simple way to formally reconcile them. Please read update at http:://www.mathfinance. Straightforward modifications of the market formulas for caps and swaptions will also be derived. 1. Efficient Options Pricing Using the Fast Fourier Transform .cn 120 .com/sol3/papers.cfm?abstract_id=1534544.cfm?abstract_id=1332205. 4." http://papers.".com/ sol3/papers. Market prices of variance swaps are extracted from option surface calibrations. The optimal design maximizes the index of acceptability introduced in Cherny and Madan (2009).ssrn. 2. We then show how to price interest rate swaps under the new market practice of using different curves for generating future LIBOR rates and for discounting cash flows. Covariances and Ellipsoids: How to Analyze and Visualize the Propagation Law of Risk in a MultiDimensional Market. Quant Nugget 1: Square-Root Rule. 3. and hint on a possible. Variance Swap Portfolio Theory.cfm?abstract_id=1548162. How Do Individual Investors Trade? .ssrn. "The Fourier transform methods provide the valuable and indispensable tools for option pricing under L´evy processes since the analytic representation of the haracteristic function of the underlying asset return is more readily available than that of the density function itself.com/sol3/ papers. The methods developed permit simulation of cash flows to arbitrary portfolios of variance swaps. "How to analyze and visualize the propagation law of risk in a multi-dimensional market. Interest Rates and The Credit Crunch: New Formulas and Market Models . " http://papers. http://papers.". "We start by describing the major changes that occurred in the quotes of market rates after the 2007 subprime mortgage crisis. hope you will also enjoy them.Friday reading list 05/02/2010 Several good working paper have been found this week. "Optimal portfolios of variance swaps are constructed taking account of both autocorrelation and cross asset dependencies. We comment on their lost analogies and consistencies. When used together with the FFT algorithms.cfm?abstract_id=1540815.ssrn. real time pricing of a wide range of option models under L'evy processes can be delivered using the Fourier transform approach with highaccuracy. "This paper examines how high-frequency trading decisions (especially the choice of market versus limit orders) of individual investors are influenced by past price changes. 5.

6.com/sol3/ papers. We argue that precision is only required to a level that is justified by the overall accuracy of the model. the required precision should be specifically analysed.cn 121 . in particular optimisation models.ssrn.cfm?abstract_id=1538760. so to better appreciate the usefulness and limitations of a model. we address the question whether trading decisions to open or close a position are different in the case in which investors already hold a position than in the case in which they don't.mathfinance.". "We discuss the precision with which financial models are handled. http://papers.com/sol3/papers.ssrn.friday Please read update at http:://www.Specifically." http://papers.cfm?abstract_id=1547173 Tags . Hence. Optimisation in Financial Engineering .

3. we all know it is time-consuming. Please read update at http:://www. the authors show this method performs particularly poorly for multiple dividends stock option.Valuation of stock option with discrete dividend When asked how to value a stock option without dividend or with continuous dividend. 2. Chriss model yields too high volatility if the dividend is paid out early in the option’s lifetime. hence underestimates an option's value. a even more sophiscated model than Haug & Haug.cn 122 . which is more sophisticated than Chriss model and takes into account the timing of the dividend.r. Below is sample Matlab codes I wrote for comparision.vol. but still. which generally overprices call options.t. Lattice method. Paper Back to Basics: a new approach to the discrete dividend problem by Haug.dt) %compare different methods for a single discrete dividend adjustments. besides replacing current stock price. and plug in the replaced stock price to Black Scholes formula. which is the simplist and the least accurate way as a result. 4.k. The authors demonstrate the high accuracy of their model with several examples afterwards. unfortunately.mathfinance. Chriss volatility adjustment model. and Other Derivatives with Derivagem CD (7th Edition). Bos volatility adjustment model. 5.d. but how to price an option with discrete dividend then? certainly Black Scholes model can't be used directly since one of its assumptions is continuous payout. results similar to the table listed in the paper function callprice = DiscreteDividend(s. non-recombining binomial tree introduced in the bible book Options. this model adjusts volatility as well because the Escrowed dividend model alone decreases the absolute price standard deviation. Futures. Haug and Lewis summarizes the following ways: 1. a single dividend is used for simplicity. for example. many people would refer to Black Scholes formula. then discount back the ex-dividend value under equivalent martingale measure. 6. Haug and Lewis method introduced in the above-mentioned paper. The basic idea of Escrowed dividend model is to adjust the current stock price by deducting the present value of future dividends. Escrowed dividend model. Haug. Haug & Haug volatility adjustment model. the basic idea is to calculate first the ex-dividend option price by Black Scholes model. it performs poorly for large dividends or long term options. However.

t.0).tdt. Escrowed = blsprice(AdjS..t.7171 10.0). (normcdf(z1)-normcdf(z1-vol*dt/sqrt(t))) exp(z2^2/2-2*lns)*d^2*.r. %%%%%%%%%Chriss. 100.r.vol2.0).t.5*vol^2)*dt.vol.cn 123 .k. option Please read update at http:://www. Chriss. z1 = (lns-lnk)/(vol*sqrt(t)) vol*sqrt(t)/2.dividend ..5001 11. 1997%%%%%%%%%% vol1 = vol*s/(s-d*exp(-r*dt)).k. or the book The Complete Guide to Option Pricing Formulas by Haug for more detail.*lognpdf(x.0). Escrowed.7.lns (r-0.t-dt. Bos.uzh.k.1039 11.0. 1998%%%%%%%%%% vol2 = sqrt(vol^2*dt vol1^2*(t-dt)/t).r.vol*sqrt(dt)).0781 11. %%%%%%%%Bos et al.vol*sqrt(dt)). Tags .mathfinance.*lognpdf(x. respectively.0). exp(-r*2*dt)*(normcdf(z2)-normcdf(z2-2*vol*dt/sqrt(t))))). 20*s)).vol1. Reading the original paper Back to Basics: a new approach to the discrete dividend problem if interested..k.k. Chriss = blsprice(AdjS.0). k d).t..nccr-finrisk. %dt: dividend time BSprice = blsprice(s.r.r.lns (r-0. lnk = log((k d*exp(-r*dt))*exp(-r*t))..k.k.pdf.vol. 2003%%%%%%%%%%%%%%% NewHaug = exp(-r*dt)*(quad(@(x)blsprice(x-d. http://www.t.0. z2 = z1 vol*sqrt(t)/2. Bos = blsprice(AdjS.6932 11.5*vol^2)*dt. (2003)%%%%%%%%%% lns = log(s).06.1. vol3 = sqrt(vol^2 vol*sqrt(pi/(2*t))*(4*exp(z1^2/2-lns)*d*exp(-r*dt)*. OldHaug = blsprice(AdjS.ch/media/ pdf/ODD. NewHaug].vol. OldHaug. %%%%%%%%%Haug.3. d. k d..vol3.vol.0).r. For example. the results of a $7 dividend after 0.r.5)): 14. AdjS = s-exp(-r*dt)*d.%read paper by Haug for detail. quad(@(x)blsprice(x-d.0. %%%%%%%%%Haug.1062.5 year are (DiscreteDividend(100. callprice = [BSprice.

's Financial Service Authority was reluctant to approve a prebankruptcy deal for Barclays PLC to acquire Lehman. I believe the most important part of this story is the way Ben Bernanke.On the Brink: Inside the Race to Stop the Collapse of the Global Financial System Henry Merritt Paulson. Tim Geithner. I have done my best to describe my actions and the thinking behind them during that time.book Please read update at http:://www." This was revealed in Paulson's new book "On the Brink: Inside the Race to Stop the Collapse of the Global Financial System". and to convey the breakneck speed at which events were happening all around us. But at the same time. AIG. "The British screwed us.mathfinance. In this book. it is primarily about my work and that of my talented and dedicated team at Treasury.cn 124 .K. where the author tell us the key decisions that had to be made with lightning speed under urgent market conditions. --Henry M. and other financial institutions. about Lehman Brothers. and I worked as a team through the worst financial crisis since the Great Depression. Our partnership proved to be an enormous asset during an incredibly difficult period. Selected author's note from the book On the Brink: Inside the Race to Stop the Collapse of the Global Financial System: Quotation The pace of events during the financial crisis of 2008 was truly breathtaking. and as hard as I have tried to reflect the contributions made by everyone involved. Paulson Tags . blurted out when he learned U. Seventy-five men served as Treasury Secretary of the United States. this is my story. There can't be many other examples of economic leaders managing a crisis who had as much trust in one another as we did.

mathfinance.cn 125 .Most recent quant job offers Most recent job offers from Quant jobs board: Scientific programmersCBCS in Cambridge MA Senior Quantitative Analyst-Modeling at RiskMetrics in London Trader Exotic Options at ING in Brussels Equity Quantitative Research Analyst at JPMorgan in NewYork PHD Internships at Bank of England in London Associate Program at Partners Group AG in London Quantitative Research Analysts at State Street in London Tags .quant . job Please read update at http:://www.

http://www.Free C++. Derivatives categories include equity options. variance swaps. which is understandable considering it is a newly launched website. etc.volopta. collateralized debt obligations. and VBA code for derivative pricing Volopta is a site I came across yesterday.derivative Please read update at http:://www. options on bonds. swaps. it contains free C++. Matlab. Have a nice weekend.mathfinance.com/index. volatility models. Matlab. swaptions.html. At the moment the files uploaded are only a few. options on futures.cn 126 . Tags . and VBA code for derivatives pricing. credit default swaps. take a look if interested.

and the the remaining part to compare the out-of-sample performances of the different approaches. Two different approximations of the hybrid models are presented in order to obtain the characteristic functions. "By using copulas.ssrn. we can separate the marginal distributions from the dependence structure and estimate portfolio Value-at-Risk. using various back-testing techniques.mathfinance.com/sol3/ papers. Moreover. the Dax Index and the Nikkei225 Index. We use the initial part of the sample to estimate the models. The effect of the approximations on the instantaneous correlations and the influence of the correlation between stock and interest rate on the implied volatilities are also discussed.friday Please read update at http:://www. This enables us to better understand why VaR estimates are too aggressive or too conservative. 99% VaR by using Monte-Carlo simulation. for portfolios made of the SP500 stock index. On the Heston Model with Stochastic Interest Rates. and can therefore be used for fast calibration of the hybrid model.Friday reading list 29/01/2010 1. "We discuss the Heston [Heston-1993] model with stochastic interest rates driven by Hull-White [Hull.Madan-1999. Dynamic Copula Modelling for Value at Risk.cn 127 .cfm?abstract_id=1382902 2.-1985] (CIR) processes. assuming for the risk factors a multivariate distribution that can be different from the conditional normal one. as in the normal.com/sol3/ papers.White-1996] (HW) or Cox-Ingersoll-Ross [Cox. Fang.Oosterlee-2008]. We apply this methodology to estimate the 95%." http://papers. we consider marginal functions able to model higher moments than the second." http://papers. et al.cfm?abstract_id=1542608 Tags . A so-called volatility compensator is defined which guarantees that the Heston hybrid model with a non-zero correlation between the equity and interest rate processes is properly defined.ssrn. These approximations admit pricing basic derivative products with Fourier techniques [Carr.

The Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It Bought a book just now recommended by a friend of mine..but I fear this is perhaps not yet the end of the story." --Paul Wilmott Below is a short video of an interview with the author.” --Nassim Nicholas Taleb Quotation "The Quants will keep hedge fund managers on the edge of their Aeron chairs. The Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It. what a looong name. for instance: Quotation “Scott Patterson has the ability to see things you and I don’t notice.quant Please read update at http:://www. Sounds like a good book for bed reading. while the rest of us read in horror about their greed and their impact on the wider economy. order one if you also fancy it. The Quants: How a New Breed of Math Whizzes Conquered Wall Street and Nearly Destroyed It Tags . The book is written by a Wall Street Journal reporter Scott Patterson and has got brilliant editorial reviews.. where Scott Patterson explains a group called "The Quants" developed complex systems to trade securities such as mortgage derivatives. which were at the heart of the crisis. In The Quants he does an admirable job of debunking the myths of black box traders and provides a very entertaining narrative in the process. A gripping tale right until the last page.cn 128 .mathfinance.

which is instead decided by investors' psychology. quantitative researchers tend to blame it is just an art where the subjective judgement is more crucial than the objective. therefore Elliott Wave Analysis has got criticism. to see how useful the basics of Elliott wave analysiscan be.). So this weekend I'm gonna talk few more words about Elliott Wave Analysis.cn 129 . etc. Get your free Forex forecasts. "it is a detailed description of how financial markets behave. thank you.Elliott Wave Analysis Last weekend I reviewed a service called elliott wave analysis at Popular Culture and the Stock Market. Or watch this classic video from Elliott Wave International's Chief Currency Strategist. Jim Martens. completely free from Elliott Wave International. Elliott discovered back in the 1930s is often all you need to make informed market forecasts." Therefore it is a type of investment discipline combining technical analysis with behavioral finance that attempts to explain and predict the market trend (of stock. key to market behavior and a pen with club logo on. Unlike those quantitative techniques we often hear or apply. As a result. Anyway. what is elliott wave principle then? as described on wikipedia.N. Then access Jim Marten's intraday and endof-day Forex forecasts. I recommend you to watch the following video "How to Use Elliott Wave Analysis to Boost Your Forex Trading" and attend the free courses then. Please read update at http:://www. Elliott Wave Analysis assumes it is unnecessary to be based on past price charts to decide where a market is in its wave patten. forex. Jim explains how the same basic pattern that R. The description reveals that mass psychology swings from pessimism to optimism and back in a natural sequence. replicable verdict of the numbers.mathfinance. elliott wave international sent me a book elliott wave principle. for example. some of my blog readers joined the free EWI club and downloaded the free report. it is not bad at all to know the non-quantitative trading world. if you are interested. creating specific wave patterns in price movements.

mathfinance.Tags .wave.cn 130 . elliott Watch this full $79 course. Click Here! Please read update at http:://www. trading. FREE.

com/sol3/ papers. and (3) the time-series patterns appear to be at odds with the cross-sectional results.cfm?abstract_id=1534325 2. especially for stocks with small market capitalization and high volatility. (ii) slowed down price discovery.com/sol3/ papers. and (iii) failed to support stock prices. The fundamental analysis of the proposed model concludes that transaction costs represent an omitted variable for the PCP model. " http://papers.ssrn.cfm?abstract_id=1537834 3. The novelty of the TC-Adj-PCP model resolves controversial transaction costs issues for traders and researchers. (2) the time-series predictability is centered on loser stocks. "this study developed a transaction cost-adjusted put-call parity (TC-Adj-PCP) econometric model to examine the efficiency of options markets.S.ssrn.friday Please read update at http:://www.cfm?abstract_id=1533163 4. On the Volatility and Comovement of U. "In this paper.cn 131 .com/sol3/papers. especially in bear market phases. We uncover a list of intriguing features of the timevariation in momentum profits: (1) market volatility has significant power to forecast momentum payoffs. we present a comprehensive examination of the time-series predictability of momentum profits. Financial Markets around Macroeconomic News Announcements Tags . Short-Selling Bans Around the World: Evidence from the 2007-09 Crisis.Friday reading list 22/01/2010 1." http://papers. "find that bans (i) were detrimental for liquidity. where the uniqueness of this variable is demonstrated under PCP in the context of options market efficiency. Econometric Modeling for Transaction Cost-Adjusted Put-Call Parity: Evidence from the Currency Options Market." http://papers. which is even more robust than that of market state or business cycle variables.mathfinance. Time-Varying Momentum Profitability.ssrn.

mathfinance. Stay tuned. Mathematical modeling and Statistics and Probability are three categories I keep eyes on. Tags .Matlab File Exchange I guess most of Matlab users know Matlab central: an open exchange for the Matlab and simulink user community.matlab Please read update at http:://www.cn 132 . including a large list of Matlab files across wide application. it has a smaller size but grow quickly. you can choose to browse files by category Specifically. where a major section is Matlab file exchange. financial services. for example. Matlab M-files database built by university of Stuttgart is another site I often visit. focusing on using Matlab for numerical calculation. Besides Matlab central.

GeometricAverageRateOption. RollGeskeWhaley. blackscholes.cn 133 . TwoAssetCashOrNothing. SuperShare. TurnbullWakemanAsian. Tags .metasystems. gbs. ForwardStartOption. what a long list! you shall download the library at http://www.no/. BSAmericanApprox. SpreadApproximation. GapOption. FloatingStrikeLookback. OptionsOnOptions. PartialTimeBarrier. JumpDiffusion. gcarry. OptionsOnTheMaxMin. EquityLinkedFXO. . black76_call.library Please read update at http:://www. FixedStrikeLookback." At the moment Meta Financial Functions Library covers a wide range of vanilla and exotic options. ExtendibleWriter. Swapoption.. SuperShare_inlined. LevyAsian. TimeSwitchOption. Executive. VasicekBondOption.mathfinance. PartialFixedLB. VasicekBondPrice. black76_put. ExchangeExchangeOption. DoubleBarrier. for example. a list of functions includes black76. TwoAssetCorrelation. as indicated by its author: "The Meta Financial Formula Library implements many commonly used functions as correctly as possible once and then provides wrapper functions and code to be able to reuse the implemenation from other tools and languages. SoftBarrier.. StandardBarrier. AssetOrNothing. as of now. Quanto. BAWAmericanApprox. PartialTimeTwoAssetBarrier. TakeoverFXoption. LookBarrier. SimpleChooser. CashOrNothing.Meta Financial Functions Library Meta Financial Functions Library is a free library for option pricing written in C++. TwoAssetBarrier. and the library is still under beta. Meta Systems offers no commercial products. PartialFloatLB. ComplexChooser. ExtremeSpreadOption. which is free and the author makes the source code clean and publicly available. learning from others is always enjoying. ForEquOptInDomCur. which can be obviously seen from the name of functions. DiscreteAdjustedBarrier. AmericanExchangeOption. BinaryBarrier. EuropeanExchangeOption.

Popular Culture and the Stock Market Long time I haven't reviewed service provided by other site.mathfinance.cn 134 . take a look if interested. EWI’s 20-plus analysts provide around-the-clock forecasts of every major market in the world via the internet and proprietary web systems like Reuters and Bloomberg. as stated by its authors: "Elliott Wave International (EWI) is the world’s largest market forecasting firm. EWI’s educational services include conferences. elliott Please read update at http:://www. webinars. Club EWI. Wall Street legend and best-selling author Robert Prechter says "You can almost hear the Dow going up and down over the airwaves. workshops. this weekend's review is about a club service by EWI. video tapes. special reports. books and one of the internet’s richest free content programs.stock ." Watch this 3-minute clip from his documentary History's Hidden Engine to see how social mood governs movements in the stock market and trends in popular culture. Then access his 50-page report "Popular Culture and the Stock Market" free. Access Robert Prechter's 50-page report "Popular Culture and the Stock Market" FREE! Tags ." Below is a video introduction and a free report to research more about its club.

Numerical tests show that our formula gives very accurate prices.Fridays reading list 15/01/2010 Two paper I find pretty interesting this week. For this class of trees. JOSHI." 2. We solve the integral equation and derive a new analytical formula in a series form for the critical stock price. our formula is now ready for traders to use in pricing and hedging the S&P 100 index options and for the Chicago Board Options Exchange to use in computing the VXO volatility index.com/sol3/ papers. American options can be priced and hedged analytically with the help of our critical-stock-price formula. the existence of complete asymptotic expansions for the prices of vanilla European options is demonstrated and the first three terms are explicitly computed. ZHANG and TIECHENG LI.mathfinance.As special cases. both are published in Mathematical Finance Journal: 1. ACHIEVING HIGHER ORDER CONVERGENCE FOR THE PRICES OF EUROPEAN OPTIONS IN BINOMIAL TREES.cfm?abstract_id=976561 Tags . "A new family of binomial trees as approximations to the Black–Scholes model is introduced." http://papers. by MARK S.friday Please read update at http:://www.cn 135 .ssrn. by JIN E. PRICING AND HEDGING AMERICAN OPTIONS ANALYTICALLY: A PERTURBATION METHOD. With the error well controlled. a treewith third-order convergence is constructed and the conjecture of Leisen and Reimer that their tree has second-order convergence is proven. "This paper studies the critical stock price of American options with continuous dividend yield.

II is a C++ program library targeted at the computational solution of partial differential equations using adaptive finite elements. using among other aspects adaptive meshes and a wide array of tools classes often used in finite element program. As stated on its webpage: "deal. Have a nice weekend. I got to know two sites after the training. music and programming.mathfinance. I will soon get a licence and start to experience myself." It should be very useful for those people playing often with PDE numerical solution.A Finite Element Differential Equations Analysis Library Attended a training of NAG Toolbox for MATLAB today (NAG is short for Numerical Algorithms Group). pocket PCs. The other site is Walking randomly.II. physics. NAG. Anyway. which is a finite element differential equations analysis library aiming to enable rapid development of modern finite element codes. Android. nice presentation and persuasive performance against Matlab toolbox.cn 136 . Tags . finite-element Please read update at http:://www.nag . vintage computing. and statistics categories. R. Linux. It uses state-of-theart programming techniques to offer you a modern interface to the complex data structures and algorithms required. I am especially interested in its Matlab. a blog where the author randomly collects things including mathematics. first one is deal.

issues. and beyond. loss of information. "Recent literature in performance evaluation has focused on preferences and characteristics of returns’ distribution that go beyond mean and variance world. Eling (2008) compared the Sharpe ratio with some of these performance measures. How does this sound? This paper derives a transparent version of the ABL model (Cheung.ssrn.cfm?abstract_id=1403916 2.) factor ranking approach is very popular among quantitative fund managers. This paper compares 13 performance measures with the traditional Sharpe Ratio using a sample of US Fixed-Income. this approach suffers from hidden factor view. "You have some factor. Results show that performance measures based on absolute reward-risk ratios have similar rankings. some straightforward linear algebra gives you the diversified and efficient Bayesian allocation that allows greater performance accountability. " http://papers. However. However.com/sol3/papers. we design a technique that endogenises the ranking process and elegantly resolves these issues. as explained in Cheung.mathfinance. However. Our numerical experiments show this is an intuitive and practical framework for factor-based portfolio construction. strategy. 1992. it allows more tangible Please read update at http:://www.com/sol3/ papers. Yes. Equity and Asset Allocation Mutual Funds. Factor Mimicking. Without an optimiser. and/or stock-specific alpha ideas. All you need is just a factor risk model. "The Fama and French (1992 and 1993 etc.cn 137 ." http://papers. The Augmented Black-Litterman Model: A Ranking-Free Approach to Factor-Based Portfolio Construction and Beyond. Hedging. Based on the BlackLitterman model (Black and Litterman.ssrn. Transparent Augmented Black-Litterman Allocation: Simple and Unified Framework for Strategy Combination. when we move to other types of performances measures. including components for all the needed functionalities. and Stock-Specific Alphas. results may be significantly different. In addition to further insights. 2009B) with an explicit allocation expression. This model explicitly seeks forwardlooking factor views and smoothly blends them to deliver robust allocation to securities. when the numerator (mean excess return) is the same. the Choice of Performance Measure Does Matter for Ranking of US Mutual Funds.Friday reading list 01/08/2010 1. etc. and found virtually identical rank ordering using mutual fund data.cfm?abstract_id=1347648 3. 2009A).

and in its close value. Tags ." http://papers.com/sol3/papers." http://papers. hedging.cn 138 .com/sol3/ papers.cfm?abstract_id=1502302 Have a nice weekend. "We present a theory of homogeneous volatility bridge estimators for log-price stochastic processes.ssrn.mathfinance.cfm?abstract_id=1347663 4.friday Please read update at http:://www. and stock-specific bets in a unified framework.com/ sol3/papers. factor mimicking.implementation of strategy combination. "We propose a general framework for efficient pricing via a Partial Differential Equation (PDE) approach of cross-currency interest rate derivatives under the Hull-White model. A PDE Pricing Framework for Cross-Currency Interest Rate Derivatives. high and low prices of incomplete bridge. Homogeneous Volatility Bridge Estimators. The main tool of our theory is the parsimonious encoding of the information contained in the open. The efficiency of the new proposed estimators is favorably compared with that of the Garman-Klass and Parkinson estimators. we focus on pricing long-dated foreign exchange (FX) interest rate hybrids. In particular.ssrn." http://papers. namely Power Reverse Dual Currency (PRDC) swaps with Bermudan cancelable features.ssrn. corresponding to given log-price stochastic process. for a given time interval.cfm?abstract_id=1523225 5.

I just put several searching filters in one page. quant Please read update at http:://www.google . Tags . while sometimes what I need is just PDF documents or Matlab files. You can also choose to search books in Amazon below. Anyway. PS: the page can also be used for keywords nothing to do with Quant staff as long as google catches them. what's worse is sometimes I prefer video results. hope you find it somehow useful: Google Quant Staff. the motivation was to make the job more convenient since I had to search in Google too many times per day. Adjusting frequently with Google advanced search makes me feel silk.cn 139 . Google Quant Staff is by no means an invention. bookmark if you like.mathfinance. simply type "Asian option" in the form and click the PDF icon Similarly each icon stands for one filter: Searching results will be openned in a new browser window in Google as what I did was creating a page to filter results. that's it.Google Quant Staff Sharing a Google Quant Staff page I created initially for myself. to find pdf documents about "Asian option". For example.

rf)..t. r = -log(0.. sigma1 = 0. for example.205.rf). and -xi units of options at strike ki. Empirical research shows the vanna volga method has a comparable pricing performance with some stochastic volatility model.r. Vega3 = Vega(s.09375. it allows for an automatic calibration to the main volatility data. Castagna and Mercurio (2007) show the implied volatility curve of vanna volga method outperforms that of Malz (1997).. sigma2 = 0.r. -delta1 units of underlying asset. as stated in the paper.t. ATM and butterfly) for a certan time to maturity. k2 = 1. Vegak = Vega(s.0979.r. k1 = 1." Below is a simple Matlab code to price a call option based on Castagna and Mercurio (2007): % option price under Vanna volga model for any strike k % sigma2 is ATM implied vol. VV pricing model has several advantages: "it has a clear financial rationale supporting. Vega1 = Vega(s. based on the hedging argument.sigma2.172..2504.k.24.sigma2..mathfinance..rf).cn 140 . k = 1.k1.. By building a self-financing portfolio consisting a unit of option at strike K.0929.9902752)/t..k3.sigma2.9945049)/t. and performs equally well as of SABR (2002).t. Please read update at http:://www. k3 = 1. t = 94/365. . especially for foreign exchange options. rf = -log(0.Vanna Volga Method The vanna volga method is a popular pricing model for implied volatilities. it can be extended to any European-style derivative...2115. sigma3 = 0. Castagna and Mercurio (2007) calculate the weight xi for three given quotes with the help of Ito's lemma and then approximate the European option value under vanna volga method. it is an empirical procedure that can be applied to "draw" an implied volatility smile curve from three given quotes (reversal. k2 is ATM strike s = 1.

-blsprice(s. price = blsprice(s.sigma2..t. x3 = Vegak*log(k/k1)*log(k/k2)/(Vega3*log(k3/k1)*log(k3/k2)).k3.de/wystup/papers/ wystup_vannavolga_eqf. VegaValue = s*exp(-rf*t)*sqrt(t)*normpdf(d1.sigma3.k3..sigma2.t.r. Interested ppl please refer to http://www.x1 = Vegak*log(k2/k)*log(k3/k)/(Vega1*log(k2/k1)*log(k3/k1)).t.r.pdf Tags .r.t.sigma2.k.net/risk/ technical-paper/1506580/the-vanna-volga-method-implied-volatilities or an advanced one www..mathfinance.cn 141 .risk.1).k1.mathfinance.rf) x1*(blsprice(s.volatility Please read update at http:://www.t.r.t. Implied volatilities curve is therefore easily achieved by inverting VV pricing model.r.sigma1.rf)).k. -blsprice(s.k1.rf)) x3*(blsprice(s..rf).rf).sigma.r.5*sigma^2)*t)/(sigma*sqrt(t)).0.rf) d1 = (log(s/k) (r-rf 0. where Vega is a function to compute vega under black scholes formula function VegaValue = Vega(s.

Will u be interested to publish it in ur site along with my link". etc.cn 142 . 2. 3. Tags . How to post an article: simply send your article to abiao @ mathfinance. the link is do-follow. more opinions on this blog is always good for our readers.mathfinance. instead of a copy from sites.. the general answer is: YES. you can. derivative pricing code and software. is highly welcomed. 2. the content of the article must be relevant to quantitative finance in general. the article must be unique and writen only for Quantitative finance collector blog. 3.cn (remove space).blog Please read update at http:://www. we will put a link back to your site in the post. Please do let me know if you are interested to do so".. quantitative risk analysis.. Forgive me if I didn't reply individually. which will increase the exposure and traffic of your site. for example. The benefits of posting artiles on this blog: 1. Posting an article is totally free as we believe it will be a win-win strategy. "I love to write unique finance articles & after seeing ur site I have written one unique article for ur site. specifically. but subject to the following criteria: 1. which means the link will be better recoganized by search engines. "I have come across finance sites and am willing to contribute with an article.Post your article on this blog Happy new year! I have got few emails and messages recently asking for the possibility to write an article and post on Quantitative finance collector blog. as a sign of gratitude. any article about quantitative trading. the site linked to must be healthy.

com/sol3/ papers." http://papers. We then focus on short maturity skews and (a) show that the difference between realized and implied SSR can be materialized as the P&L of an option strategy. this is his fourth version. so only two are selected on this Friday's reading list: 1. at order one in the volatility of volatility.ssrn. Smile Dynamics IV. which we call the Skew Stickiness Ratio and show how. Quant of the Year 2008 awarded by Risk Magazine at lorenzo bergomi smile dynamics I.friday Please read update at http:://www." http://papers. II and III.ssrn.Friday reading list 12/25/09 Have little time to read paper this week due to Christmas holiday.cfm?abstract_id=1520443 2. internationally active banks increased sharply in August 2007 and risk premiahave remained at an elevated level since. (b) introduce the notion of realized skew.cn 143 . What Drives Interbank Rates? Evidence from the Libor Panel. in particular the role of credit and liquidity factors. Recall we have collected the three simle dynamics paper by Lorenzo Bergomi. "The risk premium contained in the interest rates on three-month interbank deposits at large. it is linked to the rate at which the at-the-moneyforward skew decays with maturity. "In this paper we address the relationship between the smile that stochastic volatility models produce and the dynamics they generate for implied volatilities. We introduce a new quantity.cfm?abstract_id=1517680 Tags . This feature aims to identify the drivers of this increase.com/sol3/ papers.mathfinance.

a song Christmas With a Capital "C" Tags .mathfinance. Wish all of you healthy & wish a quick recovery of global Quant market. many thanks for your visit and support www.mathfinance.cn in 2009.christmas Please read update at http:://www.Happy Christmas 2009 Christmas & New Year are around the corner. Day day up. Good good study.cn 144 .

manage and pay contractors online.quant Please read update at http:://www. and Bid on the Project. Looking for work? Sign up at Elance and search over 30. you are in and start to do the project. who is a software engineer and gets used to do SOHO jobs. or being still a student with Quant major. once your proposal is selected. I increase my alcohol intake. I personally found several great projects already. Anyway. practice really makes perfect. this post is only for those people with similar situation with me: either being laid off as a Quant recently. most importantly. Tags . not bad payment plus opportunities to practice our quant knowledge. and is a place independent professionals to meet clients and get paid for delivering great results. to do jobs we like (please forgive me if you notice I add ad block on my blog. ok.mathfinance. a site allowing people to register as a tutor and to teach part time.cn 145 . The other site I personally find useful is first tutor.Earn money as a part-time Quant Thought twice before typing these words. two randomly chosen projects about derivative: one is forex trading strategy and the other one is about option portfolio profit and loss calculation If you are interested. "why not try to be a freelancer since you now have enough self-controlled time?".. earning by doing a job I like is always cool. I am writing the post to share my experience as a part-time Quant. Basically Elance is a portal where companies find. then I knew the site and started to earn spare money. hire. for example. being fired several months ago and now studying for my PhD. I am both types. luckily or not. just Register Free.) I know Elance several weeks ago refered by a friend of mine.000 jobs today.. earn little cash to cover my living costs (plus expenses for beer in weekends). let me make it clear. that's the first reaction he had.

". The 25 Most Powerful Men In Finance.cn 146 . http://www.co.uk/blogs/ thereporters/stephanieflanders/2009/12/ Please read update at http:://www.com/sol3/ papers. "The empirical results highlight the potential for 'stock-picking' in international indexes.cfm?abstract_id=1523365. I will collect a list of interesting paper to read on every Friday. Asymmetric information and market frictions justify the existence of a call-arrival intensity from the market's perspective." http://www. 2. Empirical results show that the reduced-form model fits callable bond price data well and outperforms the traditional approach in both insample and out-of-sample applications. using characteristics such as value and momentum. 1.cfm?abstract_id=1501141. An Arbitrage-Free Generalized Nelson–Siegel Term Structure Model. 3.Friday reading list 12/18/09 Instead of posting Chinese financial news. "We develop a reduced-form approach for valuing callable corporate bonds by characterizing the call probability via an intensity process.com/2009/ 12/the-25-most-powerful-men-in-fi." http://papers.ssrn. .frbsf.bbc.pdf. with the characteristic-based portfolios obtaining Sharpe ratios approximately three times larger than the world market.com/sol3/ papers.org/publications/economics/papers/2008/ wp08-07bk." http://papers. http://papers. Remembering Paul Samuelson. Reduced-Form Valuation of Callable Corporate Bonds: Theory and Evidence. Characteristic-Based Mean-Variance Portfolio Choice.php. Downloading links are following the titles if they are publicly available. MATLAB Applications of Trading Rules and GARCH with Wavelets Analysis. "we introduce a closely related generalized Nelson–Siegel model on which the no-arbitrage condition can be imposed. "we provide MATLAB routines for two major used trading rules. hope you'll enjoy them (please don't forget to forward to and share your favorites with me).. which is an update of an older algorithm.. 4. We estimate this new AFGNS model and demonstrate its tractability and good in-sample fit. http://dealbreaker.com/sol3/papers.mathfinance.cfm?abstract_id=972121 This week's tweets: 1. the moving average indicator and MACD oscillator as also the GARCH univariate regression with Monte Carlo simulations and wavelets decomposition.ssrn. 2.ssrn.

html.friday Please read update at http:://www.remembering_paul_samuelson. Tags . Have a nice weekend. everyone.mathfinance.cn 147 .

The organizing committee: Diethelm Wuertz Juri Hinz Mahendra Mehta David Scott Tags . Please read the conference announcement.org. The submission deadline is February 10. http://www. let alone this conference is highly relevant to our topic: quantitative finance and Rmetrics. and users from academia. 2010.Conference on Computational Topics in Finance As an ETH alumni.cn 148 . Wishing you merry Christmas and a happy new year. practitioners.org. providing a platform for common discussions and exchange of ideas. Conference on 'Computational Topics in Finance' February 19/20. The conference will bring together developers. but the conference is by no means confined to R. at the National University of Singapore. I am always with pleasure to post any issue regarding ETH. 2010.mathfinance. We would like to invite you to take part in the conference. r Please read update at http:://www. 2010. taking place on February 19/20. finance and insurance. We look forward to seeing you in Singapore. The topics will include using R/Rmetrics in finance. courtesy of Yohan Chalabi. please send your one-page abstracts to submissions [at] rmetrics.rmetrics.conference . You can find out more about both events on our website. National University of Singapore We would like to announce the first 'Computational Topics in Finance' conference. and we are now accepting submissions.

The current calculator can be only used for pricing the European Vanilla FX Options.asp its website at Tags . USD/CHF. EUR/TRY. for instance. for EUR/USD. USD/JPY.Derivative pricing Engines Another online option calculator. which is not so appealing. USD/ TRY. GBP/USD. to be honest. the main difference with other online option calculator introduced before. currencies.derivativeengines.mathfinance.cn 149 .derivative Please read update at http:://www.com/index-3. as mentioned on its webpage: it is a Dynamic option calculator whose volatility curve is updated according to market conditions. Interested reader shall check at http://www.

mathfinance. thanks. Anywhere J. Market Risk Associate at Goldman Sachs in NewYork .cn 150 .Quant jobs received within last ten days Ten days ago we set up a quant jobs board and introduced at the previous post Publish / Apply Quant Jobs. so far with the help of submitters there are over 10 jobs listed.Capital Markets at Calyon in HongKong Hedge Fund Associate at Apex Capital Management in HongKong Barclays Capital Summer Internships at Barclays Capital in London Long-Term Internships at BNP Paribas. Tags .Quantitative Summer Institute (QSI) 10 week internship progra at Credit Suisse in London Assistant Fixed Income and CDS Trader at AXA in Paris Apply for interested positions free and help us expand the board by posting your jobs.London at JP Morgan in London Global Modelling and Analytics Group .quant . job Please read update at http:://www. Morgan summer internship programme .P. Quantitative Analyst (Market Risk) at Credit Suisse in London Senior Quantative Analyst at ICBC in BeiJing Summer Internship Opportunities 2010 at Macquarie in London Trainee .

Attilio Meucci. so I just put the email here: Still Time to Access Exclusive Content from the Computational Finance Virtual Conference. Head of Research Bloomberg ALPHA Portfolio Analytics and Risk] Dr.cn 151 . Even if you did not register for the conference. Attilio Meucci. Attilio Meucci from Bloomberg. there is still time for you to view the conference presentations.mathfinance. which might attract you as well. View conference presentations by MathWorks product experts. Charles LeHalle from Credit Agricole Chevreux.Computational Finance Virtual Conference Got an email just now from MathWorks about a Computational Finance Virtual Conference. Head of Research Bloomberg ALPHA Portfolio Analytics and Risk Rigorous Intraday Trading: Best Quantitative Practices to Minimize Your Tracking Error [Charles-Albert LeHalle Head of Quantitative Research Credit Agricole Chevreux] Charles-Albert LeHalle Head of Quantitative Research Credit Agricole Chevreux Who Should Attend • Traders • Economists • Actuaries • Risk managers • Portfolio managers • Quants See exclusive keynotes by Dr. and see why hundreds of your peers from around the world attended the Computational Finance Virtual Conference. research products on the exhibit floor. research the latest information on MATLAB and several products designed specifically for Please read update at http:://www. and Dr. Conference Highlights Keynote Speakers Managing Diversification [Dr.

matlab Please read update at http:://www. and Assets • Managing Diversification • When Will the Recession End? Multivariate Time-Series in Econometrics • Rigorous Intraday Trading: Best Quantitative Practices to Minimize Your Tracking Error • Knowing Your Risk: Credit Value at Risk Calculation After a simple free registration you will be led to a page where visual conference is being hold. have a casual talk with other people at networking lounge. Interesting.cn 152 . Tags . register Until January 15 here.the financial industry. Liabilities. chat with representatives at exhibition hall. download resource at resource center.mathfinance.conference . etc. Featured Conference Presentations: • Insuring Our Future: Projection Systems. where you can watch conference video at conference hall.

http://www.cn 153 . http://www.com/ultimate-guide-to-becoming-a-quantby-mark-joshi/. 2. I'm doing 'God's work'.05 ~ 12.co.timesonline.businessinsider.ssrn.com/blog/2009/12/10/88276/attention-anthonybolton/.com/yakjony.My tweets of the week 12. 6. Capacity and Factor Timing Effects in Active Portfolio Management.11 1.mathfinance.simoleonsense. 3. 5. http://papers. Share your tweets by Tags .cfm?abstract_id=1516469. Meet Mr Goldman Sachs. http://www.com/ where-wall-street-drinks-2009-12. 4.com/sol3/papers.twitter Please read update at http:://www. Where Wall Street Gets Drunk.uk/tol/news/world/us_and_americas/ article6907681. is there financial crisis in China in the near future? http://ftalphaville.ece.ft. Ultimate Guide To Becoming A Quant By Mark Joshi. Want to invest like the former Merrill Lynch champ? Bob Farrell's 10 Rules For Investing. http://tinyurl.

edu/~jberkowi/ and the matlab files at http://www. to name a few. the order of the polynomial. Tags .cn 154 . lots of extension has been done to improve its out-of-sample performance. A growing body of empirical evidence suggests that this ad hoc approach performs quite well. and the recalibration frequency in controlled settings. heston stochastic volatility model. We show that this is the case in a formal. volatility Please read update at http:://www. In addition. SABR stochastic volatility model and Garch option pricing.Ad hoc Black Scholes model for Option Pricing One shortcoming of Black Scholes is its constant volatility assumption.uh. substitutes the result into Black Scholes formula.mathfinance. we conduct some simulations which allow us to examine the importance of the sample size. Download the PDF at http://www. which outperforms the original Black Scholes model. Quotation Abstract: One of the most widely used option valuation procedures among practitioners is a version of Black-Scholes in which implied volatilities are smoothed across strike prices and maturities.com/snde/vol14/iss1/art4/.black scholes . It has previously been argued that such a procedure works because it amounts to a sophisticated interpolation tool. Straightforward and few more lines to your codes are enough. asymptotic sense.bepress. Here is a paper "On Justifications for the ad hoc Black-Scholes Method of Option Pricing" where the author interpolates the implied volatility. We also apply the ABS approach to daily S&P 100 index options to show that the procedure outperforms the Black-Scholes formula in valuing actual option prices out-of-sample.

uop. Check it out if you happen to find http://cliodhna.edu/~hetrick/c-sources.cop.cn 155 .C/C++ for Numerical Computation A large list of C/C++ Sources for Numerical Computation. * articles and documents. especially those available over the net.numerical it useful: Please read update at http:://www. * books which come with source code.mathfinance. as its' website introduces: This is a collection of pointers to: * free source code available on the net. and hence act as low-cost libraries.html Tags .

the author adds a new chapter "the common mistakes in quantitative finance"." Anyway. "The Most Popular Search Words and Phrases on Wilmott. Tags . it seems besides the up-to-date of several chapters like "Popular Quant Books".cn 156 . Just a short comparision from the contents between first and second version. which makes me recall what the CEO of alibaba once said during his presentation: "I would explain my business plan to my grandmother to make sure she is able to understand before we take action. the author adds two more ways to derive Black Scholes formula to a total of twelve different ways.wilmott Please read update at http:://www.com" and "Brainteasers". Look forward to reading it. which might refer to the current credit crisis and draw lessons from it.mathfinance. Plus.Paul Wilmotts new book on quantitative finance Paul Wilmott has written a new book Frequently Asked Questions in Quantitative Finance since his first version two years ago. interesting. I have ordered the new book and am still waiting for my package. I was really excited when I read the first version as he explained every question within several extremely easy paragraphs even for starters.

link to the job. fill in the necessary information such as job requirement. we will NEVER delete any job published as long as the link keeps alive. Traffic and Growth Below is a snapshot of traffic this site received in Oct. How to apply for a job? If a recruiter chooses "Allow Online Applications". URL link at this job board forever. to maximize the recruiters' utility under the constraint of resources spent in posting. while we charge 20 US dollar or 12 GBP pounds per job posted by recruiters from headhunter agency. Germany.mathfinance. contract. financial engineering from the right beginning of inception. and finish. 10% is from China (HongKong).Publish / Apply Quant Jobs We added a new section into our site: Quant Jobs. temporary.) How to publish a job? Simply click post a new job at the right up side. etc. (even cheaper than one month fee to buy a backlink at some text link ads platform. trader or developer. therefore a quant job listed here is able to attract the exact types of jobseekers.cn 157 . which is a portal to publish and collect entry / junior level full time. or put another way. 30% is from United Kindom and other European countries (mainly France. otherwise we have the right to delete your post. quant trader and quant developer. applicants are able to Please read update at http:://www. All of its visitors are quant wannabe or already quants (analyst. As we try seriously to benefit all parties involved. Singapore and Japan. And we will be actively increasing the exposure of this quant job board. Among them. outsourcing jobs for quant analyst. Switzerland and Italy). nearly 40% is from United States and Canada. 2009. including the bloggers). which means you can leave your company profile. contact info. Cost Jobseekers and recruiters from the hiring financial institutions are free to use & publish opportunies. You have to pay if you are an agent. Why choose this board? Quantitative finance collector is one of the few blogs dedicated to the field of quantitative finance.

quant .cn 158 .mathfinance.apply directly by clicking "Apply Online" at the lower side of page and sending their CVs to the recruiter's email box. otherwise by visiting the company's website with URL below the job title If you have any questions then please don't hesitate to contact us. job Please read update at http:://www. Tags .

twitter Please read update at http:://www. Tags . RT: @Bank_Risk: #news #bank #HOT EU: Rising Yuan Good For China.businessinsider.cn 159 . 1. http://bit.com/y92oaf5. Rethinking the Chinese Yuan’s Re-Peg to the Dollar. Value-at-a probability not to/to succeed in financial engineering (assets allocation).4030. Mark Cuban on Financial Engineering vs. Pawel_Schwab. http://tinyurl. the real eng-ing is it? http://arxiv. Investing http://tinyurl.Wall Street Journal: http://url4. 4. Top Goldman Quant: Quant Trading Is Dead..My tweets of the week Weekend again.com/top-goldman-quant-quant-trading-isdead-2009-12..mathfinance. have a nice weekend to you all. 7.ly/5BPDRZ.org/ pdf/0911. http://www. RT: @stage_finance: Intern Opportunity BNP Paribas Global Equities et Commodity Derivatives (Paris): Structuri http://bit. No Default In Europe .com/yfcmulb. 2. 3. 5. 6.ly/ 513w97. list a selected Tweets of this week to read. RT @Bank_Risk #WSJ Decoding China's Derivatives Complaints: Foreign investment banks are getting browbeaten .eu/qfdz.

% bond price at 0 Tags . T is the maturity of bond.cir Please read update at http:://www.mathfinance. P = A*exp(-B*r0). and volatility of interest rate. alpha. kappa. h = sqrt(kappa^2 2*sigma^2). long term mean rate.Zero coupon CIR bond price A simple Matlab code to calculate a zero-coupon bond price under the Cox-Ingersoll-Ross (CIR) Interest Rate Model. B = 2*(exp(T*h)-1)/(2*h (kappa h)*(exp(T*h)-1)). sigma are CIR parameters standing for mean reversion speed. A = (2*h*exp((kappa h)*T/2)/(2*h (kappa h)*(exp(T*h)-1)))^((2*kappa*alpha)/sigma^2).cn 160 . where r0 is the current interest rate.

Please view this entry in browsers. Please view this entry in browsers.Watch Free Business TV online Below are a list of free online TVs relevant to business/finance/stock market I often watch. To watch. Please view this entry in browsers. (PS: some of them might be temporarily unavailable due to market close. online Please read update at http:://www.mathfinance. NASDAQ Stock Market A media file here. Weekly Street Critique A media file here.cn 161 . hope you also enjoy them. Get your free Forex forecasts. Please share your favorite to the list by leaving a comment. simple click "Open/close the player" (I assume you install windows mediaplayer already). Don't stop here! Get Jim Marten's intraday and end-of-day Forex forecasts FREE through February 10.tv . Please view this entry in browsers. Weekly Market Monitor A media file here. Please view this entry in browsers.) Bloomberg: A media file here. Tags . Nightly Business Report: A media file here.

C = speye(N.2. K = 10.mathfinance.) Unfortunately. respectively. Crank-Nicolson. A = spdiags([alpham*e. above or below the barrier. % compute matrices for the theta scheme theta = 0.1. where theta =0. % set parameter N = 201. N. N). s = 10. beta*e. Bar = 12. Below is a runnable naive Matlab code. B = speye(N. M = 200. r = 0. h = 2*R/(N 1). x = linspace(-R. and Wilmott values Parisian and Parasian options via explicit finite difference method. alphap*e].mathfinance. I tried to program according to that paper with theta scheme finite difference. Please read update at http:://www. NoTau = floor(Tau/k). -1:1. Schoenbucher. beta = sigma^2/h^2 r.1). and implicit finite difference.5. alpham = -sigma^2/2/h^2 -(sigma^2/2-r)/2/h.R. k = T/M. (Parisian option is a barrier option but becomes activated only after stock prices have spent a certain continuous. please correct me if you find errors.cn 162 .N) . % time-space grid R = 3.(1-theta)*k*A. pre-decided time. alphap = -sigma^2/2/h^2 (sigma^2/2-r)/2/h. T = 1. cheers & have a nice weekend. 0. where the authors Haber. the authors don't release their codes for us to study. called a window. % compute initial data u = max(exp(x)-K.N 2)'. �rrier bar = log(Bar).Pricing Parisian Options A parisian option pricer was shared at the post before at http://www. 1 refer to explicit. �rrier window 20 days sigma = 0.cn/parisian-option-pricer/. Tau = 0.N) theta*k*A.5. % compute finite difference matrix A e = ones(N.0).05.

j-1)].1).2:NoTau) = u(inx-1.'first').1.1) = 0. Tags . end Plots of the Parisian option and its delta W.u = repmat(u.cn 163 .NoTau 1).T stock prices and barrier Tau. �low using tau=0. %up and out when j=tau f = zeros(N. finite-difference Please read update at http:://www. inx = find(x>bar. end u(inx-1.parisian .1. u(:.R.%reset value at barrier point for parisian lastu = u. % compute right hand side for j = 2:NoTau 1 f = C*[lastu(2:inx-2.NoTau 1).lastu(inx-1:end-1.j) = zeros(N 2.1).j) = B\f. u(:. % start timestepping for m = 1:M lastu = u.mathfinance. % solve the linear system u(2:N 1. above using tau=tau 1.NoTau 1).

2]) returns 2.thanksgiving Please read update at http:://www. all readers of my blog.. my first run randint(1. Thanks both for your participation. 6.cn 164 .mathfinance.. so Congratulations Eugene! Please drop me a line about your postal address in US. the book you like to abiao@mathfinance. and Prof Marc Chesney. 3. I couldn't be here without his kind and countless help. Dr. my family always standing behind me as long as my choice is made deliberately.[1. Paul Embrechts. 5. since there are 2 people participating. Schwab. I would like to show my thanks of this year to: 1. Ch. Tags . 2. especially those leaving comments and sharing with me cool web sites. 4. I'll send the book to you ASAP. Sorry nico. my former colleagues at xQuant and AHL for their encouragement during my gloomy days. Back to my old post 10 Bestselling Quant books below $17. my current professor David Newton for his willingness to supervise my PhD projects.cn. especially to Prof.My Thanks This Year 2009's Thanksgiving day has come. .1. my professors at ETH and university of Zurich for their professional guide through my MSc in quantitative finance.55. Prof.

profit and loss. # Trades that take your position in any stock to more than 20% of your total portfolio value are not allowed.. which is a good way to connect with the members of your network. (slippage is the difference between estimated transaction costs and the amount actually paid. registration is free and easy. rank. and found some of them are really profitable and have good sharpe ratio. participate a competition and earn real money if you are a student and have . tested both the in-sample and out-of-sample performance of those strategies using free historical stock data. # Trades that take your position in any stock to more than 5% of its Please read update at http:://www. and each account owns $1. or between the price you want to buy/sell and the price you indeed execute. etc.00 you are able to join a network. to partly handle this issue. but you are in the danger of slippage risk of your mis-estimated model (or you even don't consider that for backtesting at all). However.) and therefore is an excellent free trading practice.edu mailbox. etc. Each member has a personal profile page showing the latest trading activity. What shall we do then? I personally prefer to try online stock practice. ask.cn 165 . Starting stock trading practice is simple. go to trading section you will find where you are able to place orders. you can.mathfinance. simple filling in basic information you will get a personal account. your friends' performance. which provides virtual money and considers the real stock market situation (bid. Today I introduce two online stock practice portal. which might kill your profit.) Many investment firms prefer to use paper trading (sometimes also called "virtual stock trading"). we have difficulty in finding a third party willing to play paper trading with us.000. one in English and one in Chinese: first one is Up & Down Practice Investing Without Risk. there are several constraints of your transactions: # Each trade is subject to a commission (virtual $$$).000. to make it as real as possible. as individuals. what will you do next? put your real money into the stock market and start trading? Yes.Online stock practice Suppose you have created several quantitative trading strategies. which is a simulated trading process in which would-be investors can 'practice' investing without committing real money.

average daily volume are not allowed. Have fun practice stock trading.mathfinance.cofool.com/. which is similar except the site is in Chinese and special trading rules of Chinese stock market are applied. # Your portfolio account is a margin account with a 100% initial margin requirement (total positions cannot exceed portfolio value).cn 166 . # You can only sell short if your buying power exceeds the size of the short position. The other portal is http://www. Tags . Ready? Join The Investing Social Network and Begin Online Stock Practice.trading Please read update at http:://www.

quantlib Please read update at http:://www.mathfinance. Bermudan. following the process.org/web/packages/RQuantLib/ index.RQuantlib Quantlib is a free library for modeling. which is self-contained and does not even require a QuantLib (or Boost) installation.html. Tags . JQuantLib aiming at Java-fans is naturally developed.html. The installation is straintforward. Nothing more to say. users are able to use the library immediately.r-project. correspondently. Asian option. mainly on Convertible bond valuation. as well as a range of fixed-income functions. which might be inconvenient for some users. So far the function and option types supported by RQuantlib are limited. vanilla and a few popular exotic options. trading. Binary option. for example.cn 167 . Barrier. Hopefully it will grow quickly. Detailed reference manual is also available at http://cran.org/ web/packages/RQuantLib/index. RQuantlib connects GNU R software with QuantLib.r-project. the source code is at http://cran. and risk management in real-life providing a comprehensive software framework for quantitative finance. American option. I tried it on my Windows. it is written in C++.

amazon .cn 168 . if two people leave a comment. However. because Amazon pays me commision for any book bought on Quant book store at Amazon.mathfinance. (no need to leave a postal address now and I will contact you on 2009-11-27) Ok. 6. nor have a friend there. that is 2009-11-27. Tags . just leave a comment at the end of this post telling the number of book you would like. the gift card will be expired and Amazon smiles. Please read update at http:://www. quant 5. the 10 bestselling Quant books below $17.N]) in Matlab will be used. the gift is less appealing to me as I am not in US.[1. 10.55 are: 1. a random commentator will be chosen and wins the book s(he) likes. 7. Have a nice weekend. 8. if one people replies (s)he will definately win. for example.55. If you happen to be in US (or have a postal address in US). today I received a gift card from Amazon with value of $17. 9.55 You might wonder why I named the title. N is numbers of commentator. and select those books below $17. if nobody participates.1. One week later. 2.55.com. so I am thinking it should be valuable for those readers of my blog located in US. sort the results by bestselling.55 is what I've earned over the past half year :). 3. each one has 50% chance. 4. The story is like this: I search "quantitative finance" and "financial engineering" at Amazon.10 Bestselling Quant books below $17. $17. Here random integer generator randint(1.

.. replacing missing value with an estimate of the actual value of that case.Unlike.Missing data imputation Probably all of us have met the issue of handling missing data. given the model (which itself is estimated on the basis of the imputed missings). The following ways are often applied to handle the problem: 1. multiple ones are (stochastically) derived from a prediction equation. from the basic portfolio correlation matrix estimation. I came across an easy-to-use missing data imputation named Amelia II developed by professor Gary King from Harvard university... Amelia II implements bootstrapping-based algorithm that gives essentially the same answers as the standard IP or EMis approaches. while the cumulation of deleted cases may be enormous except in the case of very few missing values for the latter method. it Please read update at http:://www. not positive definite correlation/covariance matrices). rather than a single imputed value.g.cn 169 . so called ‘Working around’ strategies. 2. mean imputation consists of replacing the missing value by the mean of the variable in question. or from a time-series-cross-sectional data set (such as collected by years for each of several countries). regression-mean imputation replaces the missing value by the conditional regression mean.. from a time series (like variables collected for each year in a country). these are the most widely used methods both in academia and industry. similar case from the same dataset for which that variable was not missing. 3.. Missing data are unavoidable. simple deletion strategies: including pairwise deletion and listwise deletion. how to impute missing data remains a hot topic. irgoring missing data will generally lead to biased estimates. as its webpage introduces: Amelia II "multiply imputes" missing data in a single cross-section (such as a survey). and multiple imputation. the former may lead to inconsistent results (e. expectation Maximization (EM) arrives at the best point estimates of the true values.mathfinance. to advanced multiple factor analysis. and more encompassing than the ubiquitous association of the term. ‘hot-deck’ imputation consists of replacing the missing value by the observed value from another. the Full Information Maximum Likelihood (FIML) integrates out the missing data when fitting the desired model. is usually considerably faster than existing approaches and can handle many more variables. for example. For instance.other statistically rigorous imputation software. imputation strategies.

mathfinance. installation of Amelia is staightforward: download and run the exe file. so users have to install R before running it. that's it.cn 170 . Double clicking Amelia II shows the following as you can see from the input and output menus.edu/amelia/. simply importing a csv file with missing data returns a csv with imputed data. I don't even need to run R software myself. Tags . Amelia II was developed based on R language.virtually never crashes. amazing. isn't it? Downloading the software http://gking. For me.missing-data and help documents at Please read update at http:://www. it supports csv files. the beauty of Amelia II is its friendly interface.harvard.

mathfinance.) Plese check free real time stock quotes or historial stock price from Yahoo if you prefer non-Chinese stocks.com has only closing price dividendadjusted. you have option to download daily. because I found yahoo. weekly or monthly data using this script. 3. Below are snapshots of stock prces downloaded directly from finance. for instance. low data might mistakenly treat a lose strategy as a win strategy.csv?s=symbol? Simple. high.cn/yahoo-chinese-stock- Please read update at http:://www. while there is no such an input using http://ichart. This is another reason I wrote it. ss means shanghai. why do I write it since finance. dividend info for each stock and adjust the data yourself instead of using this script.cn finance and to save as a csv file.cn 171 .yahoo. 1. therefore unadjusted high. 2.com provides such a module already.yahoo. weekly and monthly data.csv?s=symbol. where on 20090610 the stock paid out a dividend. please be aware this script is only for those interested into downloading free historical prices of firms listed in Shanghai and Shenzhen stock exchanges only. you prefer to download historical stock data from Yahoo.mathfinance.com/ table. if you are happy. week and month for daily. For instance. but also Chinese warrant data.Yahoo chinese historical stock data Wrote a simple script to fetch historical stock data from Yahoo.yahoo. for example. low data.com and from this script. respectively. by using http://ichart.php?stockNo=yourstock&exchange=ss&dateType=yourdate. a widely used stochastic indicator compares current prices to the high and low range over a look-back period. How to use the script? by typing the url http://www. which is obviously not enough if your quantitative trading strategies involve historical open.yahoo. http://www. here yourstock is the symbol of stock to download. (indeed not only stock data.cn/ yahoo-chinese-stockquotes. yourdate has three types: day. please correct me if I am wrong. and sz means shenzhen stock exchange. close.com/ table. Fine.mathfinance.

cn 172 . All stock data is from Yahoo finance China. thanks. Tags .php?stockNo=600030&exchange=ss&dateType=day will pop up a window asking you to save or open the data in csv.mathfinance.yahoo . please obey the policy of Yahoo finance.quotes. data Please read update at http:://www. Leave a message here for any error or share with others if it is helpful.

html?page=1112.com/public/ showPage. A numerical analysis shows that these moment formulas are accurate under fairly general conditions. For long-maturity options. Co-integration option pricing model.journalofcomputationalfinance. http://www. and Maximum likelihood estimation method for Merton's deposit insurance pricing model. uses the Edgeworth expansion of the risk-neutral density function. etc. for example. except when the volatility dynamic of the GARCH model exhibits an extremely high level of persistence.ca/ ~jcduan/mainfram. Analytical expressions for the first four moments of the cumulative asset return over any horizon under the GARCH model are derived in this paper.rotman. the approximate formula is generally satisfactory. and Jean-Guy Simonato in their paper "An analytical approximation for the GARCH option pricing model" published at the Journal of computational finance in 1999.html. following that of Jarrow and Rudd (1982). SABR stochastic volatility. GARCH option pricing model and its application to volatility smile. volatility Please read update at http:://www. Linear and non-linear asymmetric GARCH models. several other programming files can be also found at the page. a fast analytical approximation is developed for computing European option prices in the GARCH framework.cn 173 . Here is another way proposed by Jin-Chuan Duan. Tags .garch . Quotation GARCH option pricing framework has been developed in recent years.Garch option pricing We all know one assumption of Black Scholes model is constant volatility during option period. Matlab codes can be downloaded at http://www. Geneviève Gauthier. In this article. The analytical GARCH option pricing formula based on the Edgeworth expansion is found to work well for short-maturity options. which has been relaxed by several methods including Heston stochastic volatility.utoronto. Estimating exponential affine term structure models. The approach. However. an efficient method for computing option prices in this framework remains lacking.mathfinance.

it is a really interesting and inspiring programme.mathfinance. http://www. the only problem is sometimes I didn't follow his a little bit strange tone.Jim cramer stock market Spent the half afternoon watching Jim cramer's mad money TV show on CNBC. It's not about giving you tips that will make you money overnight – tips are for waiters.cnbc. He is the host of CNBC's Mad Money and is also a contributor to New York magazine and Time Magazine.cn 174 .jim-cramer Please read update at http:://www. cheers. and a best-selling author (Wikipedia says so). as mentioned on CNBC's Web site: the show"." Sounds good so far? here is a collection of Jim cramer's video on stock market. but to teach you how to think about the market like a pro. have to listen more. to teach you how to analyze stocks and the market through the prism of events. a former hedge fund manager.is not to tell you what to think. This show is not about picking stocks...com/id/24109723/. he is an American. The TV program Mad Money with Jim Cramer began on CNBC in 2005. I didn't realize the time passed so quickly till my roommate invited me for a dinner. and gain full access to his personal portfolio at Tags . Our mission is educational. To those who are unfamiliar with Jim cramer.

quadrature . A minor defect is its gauss quadrature point is up to 10 only.cn 175 . under integration section. it provides well explained documents. where I tested the alternative numerical method for option valuation.eng. etc. and even Youtube video. a Bermudan option). matlab and MATHEMATICA codes. quadl can't be applied anymore as we have to match the nodes of these different observation times. Here is a good site on numerical integration code I just dug yesterday: Transforming Numerical Methods Education by University of South Florida. QUAD. or the option has multiple observation times (for example. Gauss-Quadrature Rule. should you are unhappy with that. Tags .edu/index.mathfinance. If you read the original paper. therefore a good & proper numerical integration method becomes especially crucial. For example..holoborodko.. no worry.com/pavel/?page_id=679.. it includes trapezoidal rule. Have fun at http://numericalmethods.. when the option becomes exotic. however. easy to understand. (quadl does not allow users to specify how many points and how small interval an integral can have. another C/C++ code on Gauss quadrature can be found at http://www.usf. simpson's 1/3rd Rule. integral Please read update at http:://www.html.. Romberg Integration. for each numerical integration method. you will notice at the end all option valuation problems are to solve an integral equation.Numerical Integration Code A followup post of my previous entry Using Quadrature method for option valuation. which is for undergraduate student at engineering or mathematics and is therefore in plain language. My example in that post used simply Matlab embedded command "quadl". correct me if i am wrong).

cn 176 .china . in many people's eyes. which is understandble as around 91.59% of the population was Han Chinese and most minority ethnic groups Chinese have kept the tradition to live and stay where their ancestors used to live. a beautiful flash shows the appearance difference of 56 ethnic groups in China. it is indisputable each group has had a brilliant contribution to the development of China. ethnic Please read update at http:://www. Tags .56 ethnic groups in China I often saw how surprised my friend was when I told him there are 56 ethnic groups in China. Chinese look like the same. however. hereafter leading to immobility and normally what we see overseas Chinese are Han Chinese (good or not?). Anyway.mathfinance. no single group is allowed to be separated. I myself have only got in contact with less than 10 ethnic groups so far.

and Monte Carlo techniques.vol.k) B = exp(-((x0-x). ect.71429100824415. For s short comparison. with 0./(2*vol^2*dt)) kappa*x/2). dt = t.71429100893328. which is enough for this simple example.ymax. Please read update at http:://www.kappa. q = quadl(@myquad. have a nice evening.k). a simple QUAD code to price a vanilla European call option is as follows. time to maturity 2 years is 1. which provides an alternative method to value options.vol. function f = myquad(x. Basically what we need to do is to write down the problem in an integral function and to solve the function with techniques like Simpson's rule or Gauss Quadature. dividend 1%.cn 177 .Using Quadrature method for option valuation Reading an interesting paper "universal option valuation using quadrature methods". please refer to the original paper for the meaning of symbols: %using QUAD to calculate a vanila european call x0 = log(s/k). Here I arbitrarily set ymax=3. risk free rate 2%. A = 1/(sqrt(2*vol^2*pi*dt))*exp(-(kappa*x0/2)-(vol^2*kappa^2*dt/8)r*dt).x0.dt. finite difference. quadrature method (QUAD) possesses exceptional accuracy and speed.kappa. Compared with lattice (binomial and trinomial trees). volatility 20%.0.[].*max(exp(x)-1.^2. QUAD performs quite good.[].005681 seconds elapsed time using my humble laptop. the result for a European call option with strike price 9. f = B. ymax = 3. while isn't harder to implement. %Matlab embedded quadrature callprice = A*q.0)*k. in contrast with the embedded Black Scholes matlab function value 1. and 100 time steps binomial tree value 1.71422035929822.dt. isn't it? The exotic option pricing is left for further experiment.x0. kappa = 2*(r-d)/vol^2-1. stock price 10.mathfinance.

cn 178 . integral Please read update at http:://www.PS: i was seriously drunken last weekend.quadrature . my poor stomach.mathfinance. Tags .

html Tags . computational and graphing tools. instructional and course materials. Experiments (virtual computer-generated analogs of popular games and processes). As its name suggests. Los Angeles (UCLA). to draw density graph of a selected distribution. etc. Plots and Charts (comprehensive web-based tools for exploratory data analysis). Modeler (tools for distribution. SOCR tools and resources include a repository of interactive applets. Additional Tools (other statistical tools and resources). Educational Materials and Hands-on Activities (varieties of SOCR educational materials).mathfinance. for example. What is SOCR? Quotation The aims of the Statistics Online Computational Resource (SOCR) are to design.cn 179 . Anyway. http://www. What are the main SOCR Components? Quotation The core SOCR educational and computational components include: Distributions (interactive graphs and calculators). SOCR Wiki (collaborative Wiki resource).socr. Analyses (collection of common web-accessible tools for statistical data analysis). There are also limited financial applications as well. to fit a certain probability.SOCR of UCLA Statistics Online Computational Resource (SOCR) is a great application built by University of California. Graphs. technology based instruction and statistical computing.ucla. polynomial and spectral model-fitting and simulation). SOCR is mainly for people learning statistics. validate and freely disseminate knowledge.edu/SOCR.statistics Please read update at http:://www. Games (interfaces and simulations to real-life processes). sharing it just in case some ppl need a portal to learn statistics. Our Resource specifically provides portable online aids for probability and statistics education. SOCR Statistical Consulting and Statistical Computing Libraries.

job . Despite your outstanding qualifications and previous experience in rejecting applicants. After careful consideration. many people of a quant job board I often visit complain how many rejection letters they have got today. it is impossible for me to accept all refusals. I look forward to seeing you then. Therefore. Anyway. Thank you for your letter of today.mathfinance.Rejection (or offer) season It seems the time or to most people time has come this year. I will assume the position of Quant analyst in your department this December. joke Please read update at http:://www. have a nice day: Dear **. which makes me recall my gloomy life half a year ago. cheer up & take a rest.cn 180 . ** Tags . a joke forwarded by a friend of mine. I regret to inform you that I am unable to accept your refusal to offer me a Quantitative analyst position in your department. This year I have been particularly fortunate in receiving an unusually large number of rejection letters. I find that your rejection does not meet my needs at this time. Sincerely. With such a varied and promising field of candidates. Best of luck in rejecting future applicants.

but at least readers are able to have a rough picture in mind the pros and cons of each strategy. what's more.cn 181 . Whether those trading strategies still work or not is another issue. short when x day moving average crosses below y day moving average pos=zeros(size(price.x. For me.Quantitative trading strategies Spent several days reading a book named Quantitative Trading Strategies: Harnessing the Power of Quantitative Techniques to Create a Winning Trading Program. Anyway.1). %to avoid dimension mismatch lag = [zeros(y-1. I write M files of several selected quantitative trading strategies from the book I have played. either.mathfinance. Please read update at http:://www.'e'). i dont gurantee the correct of them. the possible way to modify them for our own use after reading it. the author is kind enough to disclosure dozens of strategies he created. Quantitative trading is a good introductory book showing starters what algo trading is and how to begin and what to prepare in order to be an independent quant trader.1). while Quantitative trading strategies explains what a good trading strategy is.1). be aware although I wrote carefully. how to test a trategy a trader has.1). pos(lead>lag)=1. [lead. pos=zeros(m. it is your turn to compare them. compared with the book Quantitative Trading: How to Build Your Own Algorithmic Trading Business I read & shared at my earlier post Matlab trading code. lead = [zeros(x-1. lag]. for i = 2:m %put here the way to calculate variance C UpperTrigger = price(i-1) multiplier*sqrt(C).1). Volatility Breakouts: m = size(price. pos(lag>lead)=-1. lead].y. LowerTrigger = price(i-1)-multiplier*sqrt(C).1).lag]= movavg(price. this one is in more detail and more practical. and i didn't optimize the code. sorry Moving Average: long when x day moving average crosses above y day moving average.

20).m).number of points to generate signal pos=zeros(size(p.1)<=stosc(:.2)). m is long momentum period.1).inx3))=1. pos=zeros(m.inx2)) = 1. closep. %embedded Matlab function m = size(highp. inx3 = find(longmom>0). n is for short longmom = tsmom(price.1)>=stosc(:. end end stochastic indicator: stosc = stochosc(highp.1).1).1).2)). Please read update at http:://www. dperiod). macs = zeros(size(p. pos=zeros(mm. inx1 = find(stosc(:. DI = longmom.inx2)) = -1.1). inx2 = find(stosc(:.inx2))=-1. pos(intersect(inx1. pos(intersect(inx1. inx1 = find(DI<-8). Divergence Index: %divergence index strategy.n).if price(i)>=UpperTrigger pos(i) = 1. elseif price(i)<=LowerTrigger pos(i) = -1. inx2 = find(longmom<0).1)<=80). lowp. Moving Average Confluence Method: % p .1).mathfinance. pos(intersect(inx1. shortmom = tsmom(price.*price* data % N ./var(diff(price)).1)>=30). inx2 = find(stosc(:.1). mm = size(price.*shortmom. pos(intersect(inx1.cn 182 . for i=1:20 j=i*4. kperiod. inx1 = find(stosc(:.

for example. There are other strategies left to you to backtest the effectiveness of technical analysis.mathfinance.trading .2). strategy Please read update at http:://www. MACD Histogram Retracement. Kestner’s Moving Average System.1). Normalized Envelope Indicator. Have fun. Tags . pos(macssum<=(100-N))=-1. end macssum = sum(macs. Second Order Breakout. macssum(1:80) = 50.i) = 5. macs(lead>lag. %to avoid dimension mismatch lag = [nan(j-1.cn 183 .[lead. lead]. lead = [nan(i-1.'e').j.1). %first 80 observations with zero position pos(macssum>=N)=1. etc.i. lag].lag]= movavg(p.

Quantitative trading strategies Spent several days reading a book named Quantitative Trading Strategies: Harnessing the Power of Quantitative Techniques to Create a Winning Trading Program. Free real time stock quotes This weekend's review is about a free real time stock quotes website: ADVFN.mathfinance. 3. 2. NYSE. Who is ADVFN? ADVFN is the one of the worlds largest stocks and shares websites.. This book has got wonderful review like “This book clarifies many of the mysteries of Neural Networks. this one is in more detail and more practical..Featured Entries of blog 1. McNelis. Neural Network Prediction Neural network matlab source code accompanying the book Neural Networks in Finance: Gaining Predictive Edge in the Market by professor Paul D. Offering the private investor FREE streaming prices from NASDAQ.. Dow Jones. compared with the book Quantitative Trading: How to Build Your Own Algorithmic Trading Business I read & shared at my earlier post Matlab trading code...cn 184 .. Please read update at http:://www.

" In short.cn 185 . where people can track the latest publications for each selected Journal.mathfinance. Trading and Video. What is FERC. etc.financial-engineering Please read update at http:://www. Journal. Overall I find FERC makes my daily reading easier. for example. visitors are able to read and track the latest posts of dozens of websites on FERC only.. Daily news. check Financial Engineering Resource Center (FERC) if you are curious as well. US. Journal of financial economics. There are subsections under several categories. etc. Simply from the name we can guess the content under each section. trading is the latest model and technique written by well-known quant trader. Currently FERC has the following sections: Books. daily news is about some recent interesting news might be worth reading. Tags . Asia and world. hopefully it will save the time and improve work efficiency. Software. Job. Mathematical finance. "Basically. as the site describes. Journal includes Journal of finance.Financial Engineering Resource Center This week's review is about Financial Engineering Resource Center (FERC). Financial engineering resource center (FERC) aggregates useful posts/info from all around the web and provides related items on a single page. Quant answer. Job consists of UK.

matlab . Aly Kassam again introduces in plain language how to use simple Matlab commands for algo trading and what's new for 2009 . Click here to watch it.Algorithmic Trading with MATLAB Webinar Just a followup of my previous entry Matlab trading code. trading . where you can watch Algorithmic Trading with MATLAB Webinar following one of the links. including: Quotation • building a robust and generic back-testing framework • building and testing nonlinear trading models • using parallel computing to improve efficiency • deploying models to work with third party software Tags . Dr. algo Please read update at http:://www.cn 186 .mathfinance.

cn 187 . Maximize Matlab performance. easy for beginners.microsoft.no/ ~pjacklam/matlab/doc/mtt/index. matlab tips and tricks. Tags .. http://www. Writing Fast MATLAB Code.matlab Please read update at http:://www. when compared with others like C++. MATLAB array manipulation tips and tricks.html. Be ready to take off. 1.html. 3.edu/~marios/ matlab/matlab_tricks. etc. http://www.edu/ local-apps/matlabhelp/techdoc/matlab_prog/ch7_per6.Making your Matlab Fly Undoubtedly Matlab is one of Quant researchers' most favorite software. Matlab is in some sense less efficient than Compiled language. one con of Matlab I often heard is its slow speed.online. http://home. however. PDF doc. 2. 5.columbia.mathfinance. http://research. 4.com/en-us/um/ people/minka/software/matlab. amounts of online free shared codes.northwestern.html Many other Matlab accelerating skills can be found on the webpage 4.ece.html. below are tips and tricks I personally find useful and easy to apply. Accelerating Matlab. As an Interpreted Language.ee. we can speed it up by using tricks like vectorization. helpful doc. to fly your Matlab. unfortunately.

What interests me is Gaussian process regression is the best model by the authors. at the end the authors rank the models by their out-of-sample symmetric mean absolute percentage error (SMAPE)." Should you are interested. by using Gaussian process regression to extend a function beyond known price data.gaussianprocess. The winning four models turned out to be: 1: Gaussian process regression. and by how much.mathfinance.Gaussian Process Regression I recently read a paper comparing the performances of different models to predict stock returns. 4: A very simple model based on a simple moving average. as stated: "A List of different monitored learning techniques have been attempted to predict future stock returns. both for potential monetary make and because it is an interesting research problem.regression Please read update at http:://www. Generally.org/gpml/ Tags . 2: Neural network. we can predict whether stocks will rise or fall the next day. http://www. a Gaussian processes can be cosidered to be defining a distrubution over functions with the inference step occurring directly in the space of functions. We use regression to capture changes in stock price prediction as a function of a covariance (kernel or Gram) matrix. 3: Multiple regression model. Thus. accompanying Matlab package is also available at the website.cn 188 . here is a book Gaussian Processes for Machine Learning to be freely downloaded. surprisingly for me. For our aims it is natural to think of the price of a stock as being some function over time.

they aгe universal non-lineаr function approximators meаning that givөn the rіght data аnd configured сorrectly. thөy can capturө and model any inpυt-output relationships.cn 189 . frankly speaking. Suмmary of operation: * The trаder. While the advanced mаthematical nature of ѕuch adaptive systems haνe kept neural networks for financiаl analysis mostly within academіc reѕearch cirсles. and/oг indіces. enters the tickers in capital letterѕ. Their use comөs іn because tһey can learn to deteсt compleх patterns in data. * The needed histoгical and real timө share price quοtes and volumes aгe looked up and compared automatically. separated by commas. * The neural network searches for a nonlinear mathematical relаtionship (pattern) relating thө рrices and volumөs tο the tіcker of interest. in гecent years morө useг friendly neural network software haѕ made tһe technology more accөssible to tradeгs. while the user participates by controlling а sensitivitү (also called 'мomentum') adjustment * When sensitiνity iѕ tһen set to zero. I am not fully convinced by the effectiveness of those black-box models like neural network algorithm. Thiѕ not only reмoves the need for human interpretation of charts οr the serіes of ruleѕ for generating өntry/exit signals but also provides a bridgө tο fundamental analysіs as that tyрe of data can be usөd as input. In аddition. In mathematical tөrms.mathfinance. Tһey are artificial intelligence adaptive software systems that have been inspiгed bү һow biologicаl neural networks work. аs ANNѕ arө esѕentially non-linear statistical models. their accuracy and prediction capabilitіes can bө both mathematiсally аnd empirically tested. using at your own risk though. wishіng tο quantіfy the relationship amοng a group οf stοck or share prices. graрhs shοw two yөars οf correct Please read update at http:://www. while thө υser participates by сontrollin# rөlating the priсes аnd volumes to the ticker οf interest. In various studіes neural networks used for generating trading sіgnals һave significantly outpeгformed buү-hold strategies аs well aѕ traditional lineaг technical analysis mөthods. Since tһe earlү 90's when thө first practically usable types emerged. artificial neural networks (ANNѕ) have rapidly grοwn іn popularіty.Neural Network Calculator A friend recommended me this software.

and rigorous backtesting. by tһe nuмber of days the υser hаs set on thө slider during training. Downloading or trying online through http://www.mathfinance.goldengem. * The relationshiр іs extended intο the future to мake a forecast.cn/neuralnetwork-source-code/ Tags .uk/ or the one I introduced before http://www. and the his estimation of the likelihood that tһe mathematical relationship which has bөen found will continue to hold in the future. through whіch the υser maү visually assөss wһether the relatiοnship is valid throughοut historical time. * 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.co.mathfinance.neural-network Please read update at http:://www.cn 190 .

just search "bond calculator" at the Market section of your gphone." A snapshot looks like To install the application. Tags . As described by its author: "this application computes fair value of bond when par value. Coupon is paid semi-annually by default. Current date is auumed to be the settlement date. coupon frequency and yield is supplied. gphone Please read update at http:://www.mathfinance.cn 191 .calculator . It computes yield when bond price is supplied.Basic Bond Calculator on Gphone Compared with option calculators on Gphone introduced before. Basic bond calculator is a simple application aiming to price a vanilla bond value and yield to maturity (YTM) only. time to maturity. coupon rate. Maturity time can be entered or selected.

http://bespokeinvest. Asia IPOs boom on China listings.china Please read update at http:://www.cn 192 . more to follow. I will collect Chinese financial news (ideally on quantitative finance) of the past week.html.com/cms/s/0/ 2e1eaef0-9da0-11de-9f4a-00144feabdc0. http://www.mathfinance.com/article/businessNews/idINIndia-42270120090907 Bank of China to invest in hedge funds.com/2009/09/china-to-issuerenminbi-bonds-to. http://in. http://www.reuters. http://www.fundmymutualfund. China backs efforts to break oil contracts.html?nclick_check=1.ft.com/cms/s/0/ 981d1990-9bcf-11de-b214-00144feabdc0.html.Chinese financial news From this weekend on. hoping to help those people who have interest to invest in Chinese market. Tags . 中国金融信息 China to Issue Renminbi Bonds to Offshore Investors. China ADRs: Even Better Than the Real Thing.html.typepad.com/bespoke/2009/08/china-adrs-evenbetter-than-the-real-thing.ft.

Play with cointegration has several good papers to start with.html Tags .cointegration Please read update at http:://www. code and detailed example.Test cointegration with R Cointegrated pairs of securities are crucial for mean reversion trading portfolio construction. http://quanttrader.mathfinance. cheers.info/public/testForCoint. here is an excellent webpage with data. Should you want to test pairs of securities for cointegration using R.cn 193 .

It is an easy-to-understand book on implementing quantitative (or algorithmic) trading for independent traders. for instance. trading Please read update at http:://www. Life is wonderful except I have a little worry about my British visa.html?id=30376&p1=50647&p2=50649 Trading with Matlab: http://www. This is the area fascinating me from right the beginning of learning quantitative finance.mathworks. etc. Pairs Trading.com/home Interactive Brokers via Matlab: http://www.mathfinance.html There you could find and download useful resources and API code on Matlab trading. enjoying delicious food. visiting parents and friends.Matlab trading code I have been on vacation for exactly two weeks. Quantitative Trading: How to Build Your Own Algorithmic Trading Business is a great book I bought several months ago but had few chances to read until recently.com/company/events/ webinars/wbnr30376. Intraday Data Acquisition. reading Chinese fictions. the three sites I have visited often within the last week are: Recorded Webinar: Algorithmic Trading with MATLAB for Financial Applications: http://www. Enjoy. Therefore I have started to play algorithem trading with Matlab.maxdama. Tags .tradingwithmatlab.cn 194 .matlab .com/2008/12/ interactive-brokers-via-matlab.

Offering the private investor FREE streaming prices from NASDAQ. NYSE. Dow Jones and many more indices from around the world.cn 195 . Being a free member you can access to real-time Dow Jones and NASDAQ indices. message boards and stock screening tools. research. news. one of the worlds largest stocks and shares websites. Charts. The free services includes: # Quotes # Comprehensive Java & HTML Charting tools # Streaming Stock watch lists (monitor) # Free bulletin boards # Portfolio # Stock screening tools (toplists) # Trades # Company Financial data # News # Alerts # World market profiles Please sign up as a free member to download FREE stock quote Tags .Free real time stock quotes Get your free real time stock quotes here. FOREX. plus delayed US and world markets stock prices and indices. etc.data Please read update at http:://www. We provide free service like Stock Quotes. Watch lists. managed funds.mathfinance. You will also be able to access comprehensive range of free charting. Financials News.

mathfinance. digital option. For detail about options description and calculator please visit http://www. touch options (one touch.php Tags .com/tools/calculator/index. double no touch). no touch.calculator . double one touch. fx Please read update at http:://www. double barrier) and Black-Scholes Implied Volatility Calculator. barrier option (single barrer.cn 196 .mathfinance.FX option calculator Another FX online option calculator by MathFinance covers Vanilla option.

Tags . visiting my family and friends. be positive.. every coin has two sides. positive. and come back to UK by the end of August. anyway.career Please read update at http:://www. travelling around. hopefully. it is a hard decision without getting much support from my family.cn/ contact-me.mathfinance. thanks. etc. In the meantime I have to reduce blog publishing frequency. but if you do have any interesting staff. I have made up my mind to continue to study a PhD. please leave me at http://www. Have a nice summer.mathfinance.cn 197 . China -> Germany -> China -> Switzerland -> London -> Nottingham I will have to go back to China for my student visa and stay there for nearly two months.My last day in office Today is my last day in the office.

the script will return the following MFE programs: 1. and with financial aid".) Vanderbilt University in Nashville Clicking the link leads you to a page showing the more detailed introduction of this program. tuition.finmath. Flickr and Twitter. job placement? Find MFE is a simple php+mysql page I wrote yesterday evening.mfe Please read update at http:://www.mathfinance. Find your ideal MFE at http://www.) Kent State University in Kent 4. adding a comment or leaving a message.) The University of Arizona in Arizona 7. only a few people have the chance to study at these top schools.cn 198 .Find MFE Program Master of Financial Engineering (MFE) degree has increasingly become a shortcut for people willing to work at a financial institution. size of class.) I have no idea if people would find it useful or totally rubbish. program website. depending on your feedback. Haas MFE. possibility to get financial aid.) Bentley College in Massachusetts 2. Thank you. anyway. especially to pursue a Quantitative finance related career.) Florida State University in Tallahassee 3. for instance. it just tests the water.) Purdue University in West Lafayette 6. the goal is to filter your ideal MFE program by the self-defined criteria. total tuition less than $40K. Columbia FE. including length of study. There are dozens of universities around the world providing with MFE program. how do you choose other program then? which factors will you give priority when applying? location. for example.) Princeton University in Princeton 5. you can say "I want to find a MFE program in United States.cn Tags . I fully understand the accuracy of the searching results depends largely on the information collected. Advanced search like the job placement can be easily added technically. etc. (some content requires you to be able to get access to those sites like Youtube. Sadly or not. please do help to improve it by rating the MFE program. and NYU are indisputably among the best.

plots and White's model-misspecification tests cascading estimation separate. analytical gradients and combined maxlik()/EM algorithms for fast calculation descriptive statistics.hec.mathfinance.html and a Guide to the Bank of Canada Gauss Procedures at http://papers. This Regime-Switching Model library lets you to estimate a general class of regime-switching models along the lines of those described in James Hamilton's textbook. switch Please read update at http:://www. faster code for "simple switching" models (i.i. mixtures of regimes. Key features and limitations of the code include: one independent variable only two states only arbitrary number of observed variables may be included to explain timevarying transition probablities or state-dependent means external c-code.Regime-Switching Model library in Gauss This is the most up-to-date version of the switching regression procedures built by Simon van Norden and Robert Vigfusson with help from Jeff Gable. Tags .cn 199 .cfm?abstract_id=50565.vannorden/codepage.) learn more and download at http://www.ssrn.ca/pages/simon.regime .d.com/sol3/ papers.

6th Edition. I bet many people have heard of it or even used it.com and get Career Guides for Free. blogs and research tools.cn 200 . enjoy! Tags . a network of message boards for professionals. expecially on investment banking industry. articles on workplace topics. Vault publishes over 120 career guides and its web site. students and professionals have discovered that Vault is the Internet's ultimate destination for insider career and education information.com is the leading media company focused on careers. and job-related video. I remember when I looked for a job before graduation. Vault. both of which provide with clear explanation and insightful experience on how to look for a job and prepare interviews efficiently.career Please read update at http:://www. the two books I read often were Heard on the Street: Quantitative Questions from Wall Street Job Interviews and Vault Career Guide to Investment Banking. university. features thousands of company.. Vault provides salary surveys.Vault career guide This weekend's review is about vault career guide. industry and occupational profiles. Job seekers. Here is an opportunity to sign up for free membership on Vault.mathfinance. Additionally.

mysmu. the main point of this paper is to use Monte Carlo simulation. Monte Carlo studies show that the proposed procedures achieve bias reductions over ML estimation in pricing contingent claims when ML is biased. Download the paper and accompanying matlab http://www.Simulation-Based Estimation of Contingent-Claims Prices Please allow me to share an interesting paper I came across this morning. to reduce the biases caused by MLE method alone. The method is implemented and evaluated here in the Black-Scholes option pricing model and in the Vasicek bond and bond option pricing model. mle code at Please read update at http:://www.edu/faculty/yujun/research. The bias reductions are sometimes accompanied by reductions in variance. This paper proposes a simulation-based method. Some consequences for the statistical testing of contingent-claim pricing models are discussed. When it is used in connection with ML. it can improve the finite-sample performance of the ML estimator while maintaining its good asymptotic properties.html Tags .S. In the literature. along with Maximum likelihood estimation (MLE). the preferred choice of estimator is usually maximum likelihood (ML). It is especially favored when the bias in ML is large due to strong persistence in the data or strong nonlinearity in pricing functions. Simulation-Based Estimation of Contingent-Claims Prices. Quotation A new methodology is proposed to estimate theoretical prices of financial contingent claims whose values are dependent on some other underlying financial assets. Treasury bills highlight the differences between the bond prices implied by the simulation-based approach and those delivered by ML. ML has strong asymptotic justification but is not necessarily the best method in finite samples.mathfinance.simulation . Empirical applications to U.cn 201 .

). etc. index sampling. LAD. Markowitz.). for derivatives pricing (dynamic delta hedging. This library contains procedures: for computing backtest (monthly rebalancing. ML. Quantile regression. unfortunately) at the author's webpage. etc. for statistical methods (Artificial neural networks. bull-spread. for stock screening (gini optimization.). Tags . etc. Hedge fund replication. scoring methods. PCA. RBS. etc. FLS. trend-following strategy. for time series analysis (arch. garch. risk Bbdgeting. concentration.). library and lecture notes (in French only. vix. Robust. for computing numerical algorithms (simplex set.mathfinance. Huber. baging method.). take profit strategy. boosting. fees managing. etc.library . carry trade. copula. MDP. currency hedging. etc.) for strategy backtesting (covered call.cn 202 . NLS. Tobit. GMM. Sharpe style analysis. QP.Quantitative Asset Management library I would like to take this opportunity to thank the author Thierry Roncalli for letting me know this great source.) Please download the manual. MARS. spectral analysis. absolute return strategy. 130/30. for portfolio allocation (Black-Litterman. QAM (Quantitative Asset Management) library: QAM is the Gauss library which has been developped for the lecture notes on Quantitative Asset Management. Non-parametric Kernel regression.). Markov generator. Logit. MSR. quadrature rules. vecm. Probit. Fokker-Planck equation. long/short equity. CSS. etc. performance reporting. factor models. ERC. etc. etc.) for risk management (stop loss strategy. variance swaps. wavelets. quantitative Please read update at http:://www. strategy leveraging.

research is the key to success for investment..000 # Living in households averaging $150.000 per year Get access to More than investment news.from beginners to the most experienced.cn 203 . Founded in 1984. Consistently ranked among the best investment sites on the web.mathfinance. Morningstar appeals to a wide range of investors -. Morningstar. Because the products focus on sound investing fundamentals and take a friendly.. investment Please read update at http:://www.com offers a wide range of online portfolio management tools. They are likely to be.Morningstar investment research This weekend's review is about Morningstar investment research. financial data. Morningstar is one of the most respected names in independent investment research and opinion. In-depth Investing Analysis & Trusted Opinion.. needless to say.. and more.research . video commentary. easy-to-understand approach. unbiased stock and fund analysis. The mission is to create great investing products to help people reach their financial goals. GET YOUR FREE TRIAL NOW! Tags . as well as the recognized leader in stock and mutual fund analysis. # College educated (80%) # Male (82%) # Managing a portfolio averaging $870.

html Tags ..edu/WebBook/LeSage/ etoolbox/var_bvar/contents.rri. It is a natural extension of the univariate autoregressive model to dynamic multivariate time series. Unfortunately I have not used it except once I tried the built-in VAR function in Eviews over 5 years ago. when one of my classmates did a seminar presentation on it. Wikipedia has a detailed explanation on it. and easy to use models for the analysis of multivariate time series.wvu..afpc. what i do get is a sample spreadsheet showing the VAR Series Analysis & Results but it seems the author intentionly hides the macro code.mathfinance. If you are happy with Matlab. flexible. do you know of any links or any books that have this as code. here is a Vector autoregression (VAR) package where you can track line by line how to implement and use the model.vector-autoregression . Sorry I couldn't find useful VBA code.cn 204 . The VAR model has proven to be especially useful for describing the dynamic behavior of economic and financial time series and for forecasting.tamu.. hope it helps. var Please read update at http:://www.I am looking for examples of Vector Autoregression so I can code into excel.xls. http://www." Vector autoregression (VAR) model is one of the most successful..Vector autoregression (VAR) Neil left me a message: ".edu/courses/622/files/lecturedemos/ Lecture%2007%20Vector%20Autoregression. http://www.

Tags .mathfinance.cn 205 .maths.Sobol sequence generator Sobol sequence has been shared at posts Sobol and Generalised Faure sequences. The reason I open a new post for it is it is able to support up to dimension 15000.html. halton and sobol sequences.sobol . respectively.au/~fkuo/sobol/index. Check it out at http://web.edu.unsw. and Primitive polynomials for Sobol sequences. Here is another Sobol sequence generator containing the primitive polynomials and various sets of initial direction numbers for generating Sobol sequences. incredible. Please read Low-discrepancy sequence at Wikipedia for introduction. monte carlo Please read update at http:://www.

Graph .edu/~ahossam/rnnsimv2/ Logistic regression http://www.Chemometrics .caltech.Graphics Images .MPI .Control .Engineering .. including the following classifications: Audio .Communications .SVM .csp. .Web ..ncsu.Plot .edu/~ihler/code/ BOOTSTRAP MATLAB TOOLBOX http://www.Misc.cn 206 .gps.edu/~pfackler/compecon/toolbox.ucf.Chaos Chemistry . toolbox Please read update at http:://www.html Random Neural Networks http://www.tech.Data Mining .ICA .Medical .BiomedicalInformatics .html CompEcon Toolbox for Matlab http://www4.Optimization .Astronomy .com/ ARfit: A Matlab package for the estimation of parameters and eigenmodes of multivariate autoregressive models http://www.mathfinance.GAs .uk/ spmc/links/matlab/matlab_toolbox.cs.plym.edu/~tapio/arfit/ Time Series Analysis http://www. Recommended matlab toolboxes: Kernel Density Estimation Toolbox http://ssg.Fuzzy .Coding .Excel .Markov .etc .Kernel .Finance .ac.html Tags .dpmi.Optimization Statistics .mit.MIDI .matlab .Matlab toolbox Dozens of Matlab toolboxes(packages) for downloading.curtin.tu-graz.spatial-econometrics.ac.NNets Oceanography .Signal Processing .at/~schloegl/matlab/tsa/ Interested ppl may download more at http://www.edu.FEM .au/downloads/bootstrap_toolbox.

m : Newton's Method with Simple Dogleg levmar.m : Hooke-Jeeves code mds.m : BFGS. the application of optimization routine ranges from fundamental mean-variance Markowitz efficient frountier to advanced neural network stock price prediction. used in implicit filtering and NelderMead codes hooke.cn 207 .m Numerical Derivatives: diffhess.m : Nelder-Mead simpgrad.m : Simplex Gradient.m : Steihaug CG-dogleg Bound Constrained Problems: gradproj. as do several other codes Trust Region Codes: ntrust. Here is a carefully selected group of methods for unconstrained and bound constrained Matlab optimization problems including: Line Search Methods: steep. polymod.m : directional derivative.m : Levenberg-Marquardt for nonlinear least squares cgtrust.m : Difference Hessian.siam.mathfinance. Tags .optimization Please read update at http:://www. requires dirdero.m : Damped Gauss-Newton bfgswopt.Matlab optimization introduction it is indisputable that optimization has been a crucial part to our financial world.m: Projected BFGS code Noisy Problems: imfil.org/books/kelley/fr18/matlabcode.m : Steepest Descent gaussn.m : Gradient Projection Method projbfgs.php for detail. low storage Polynomial line search routines: polyline.m : Multidirectional Search code Check http://www.m : Implicit Filtering nelder.m .

com is an online facility for the valuation and risk management of interest rate derivatives. Further details can be found here: http://www. quantitative analysis. accounting and trading of the previously mentioned financial instruments. risk-management. the accrued interest as well as the value of a basis point for virtually any interest rate swap contract.com provides everything needed to quickly determine the net present value. Bramaan.mathfinance.swap . but is not limited to.bramaan. the development of custom software platforms and the implementation of processes and procedures for the daily administration. rate Please read update at http:://www.Online Swap Valuation Bramaan.cn 208 . This includes.com/ Tags .

**Heuristic Optimization for Downside Risk Minimization
**

Modern portfolio optimization started with Markowitz Efficient Frontier, Heuristic search and optimization is a new approach for solving complex problems that overcomes many shortcomings of traditional optimization techniques. Heuristic optimization techniques are general purpose methods that are very flexible and can be applied to many types of objective functions and constraints, especially where the objective function is non-convex and has many local minima. This is in particular the case when the risk is expressed as VaR, expected shortfall, Omega, maximum loss etc., and when the future returns of the individual assets are modelled as scenarios. An interesting paper "A Data-Driven Optimization Heuristic for Downside Risk Minimization" demonstrates how to apply Heuristic optimization method under constraint of downside risk, code can be downloaded at http://comisef.eu/?q=resources_data_driven_opt, take a look if interested. Tags - heuristic , optimization

Please read update at http:://www.mathfinance.cn

209

**The end of 100% mortgages is definitely a positive
**

Consumer Credit awareness website, CreditChoices.co.uk reports that Major British lenders such as Abbey Mortgages will not be returning to the practice of issuing 100% mortgages in the near future. In fact most UK lenders are requiring as much as 20% deposits on home purchase loans. While on the surface this may seem an unfair adjustment, one must also consider that those generous loans were based upon inflated real estate values. Further the larger sum that one finances the larger the monthly payment will be. This latter statement illustrated by using the remortgage calculator found at Credit Choices. So we combine these two factors and arrive at a unique conclusion... we are better off without 100% mortgages and easy credit. Consider this, a house costing £200,000 just two years ago is selling for around £150,000 today. With a deposit of 20% or £30,000 there remains a principle due of £120,000 pounds. This results in a difference of over £500.00 monthly! Imagine the total cost over 25 years. Even factors such as mortgage protection are more costly on the larger loan. Yes many of us may not have the larger sum to place as deposit but that does not negate the data showing that 100% mortgages do no one any favour. Tags - mortgage

Please read update at http:://www.mathfinance.cn

210

**SIMTOOLS and FORMLIST Excel add-ins
**

Simtools.xla and Formlist.xla are add-ins for Microsoft Excel (version 5 and later). Simtools adds statistical functions and procedures for doing Monte Carlo simulation and risk analysis in spreadsheets. Formlist is a simple auditing tool that adds procedures for displaying the formulas of any selected range. Selected features include: Inverse cumulative-probability functions; Functions for working with correlations among random variables; Functions for decision analysis; Functions for analyzing discrete probability distributions; Functions for regression analysis; Functions for randomly generating discrete distributions; Download Simtools.xla and Formlist.xla add-ins and instructions at http://home.uchicago.edu/~rmyerson/addins.htm Tags - excel

Please read update at http:://www.mathfinance.cn

211

CreditMetrics spreadsheet

CreditMetrics is a framework for measuring credit risk of portfolios of traditional credit investments (for example, loans, commitments to lend, financial letters of credit), fixed income products, and market-driven instruments subject to counterparty default (swaps, forwards, etc.). It is a lot more complex than RiskMetrics, and thus requires a deliberate inspection. Actually, within the CreditMetrics framework, users are confronted with a mixture of choices. For instance, CreditMetrics grants users to follow one of four different approaches to calculating correlation among several credit types-historical data, bond spreads, equity correlations or consistent constants. Here is an Excel 7.0 spreadsheet demonstrating how to use CreditMetrics to compute credit risk of a portfolio, technical document is free to download at http://www.ma.hw.ac.uk/~mcneil/F79CR/ CMTD1.pdf. Functions for calculating the CreditMetrics risk model in R are at: http://cran.r-project.org/web/packages/CreditMetrics/ index.html Tags - creditmetrics , spreadsheet

Please read update at http:://www.mathfinance.cn

212

**My blog is published at Amazon Kindle
**

Amazon Kindle is a software and hardware platform for reading electronic books developed by Amazon.com, few days ago a friend of mine told me Amazon had a new service called Kindle blog, which gives a blogger chance to publish his or her blog at Amazon for free. Since nothing to lose by exposuring a blog to one of the world's largest websites, I submitted immediately and 10 minutes ago found my blog was successfully listed at Amazon Kindle. I intent to make it free but I am not allowed to do so, Amazon automatically sets the Monthly Price at $0.99 and includes wireless delivery via Amazon Whispernet, nevertheless, blog subscription starts with a 14-day free trial, and you can cancel at any time during the free trial period. (I double checked the publisher's policy, Amazon will charge 70% of subscription fee while bloggers receive the left 30%, that is to say, I earn only $0.297 per subscription.) I don't expect people to subscribe my blog via Amazon Kindle as it is totally free on web, however, if you happen to use Kindle and would like to buy me a 1/5 bottle of Beck's beer, I will be pleased . Check it out at http://www.amazon.com/gp/product/B0029U2FQ6

Tags - amazon , kindle

Please read update at http:://www.mathfinance.cn

213

**Binomial tree for American option
**

This is a follow up post of my previous entry Nine Ways to Implement Binomial Tree Option Pricing because the latter covers European option only. Compared with pricing American option by Crank-Nicholson finite difference or American Options via least square Monte Carlo Simulation, Binomial tree is the easiest to implement, what you need to do is just adding a MAX expression on every node of your tree. Here is a paper on the implementation of binomial tree methods for the pricing of American option' value and Greeks, matlab codes can be found in the paper or separately here. Tags - binomial , american

Please read update at http:://www.mathfinance.cn

214

**Eight rules a risk manager must remember
**

Unlike launching rocket, managing risk is a combination of art and science that should incorporate a number of fundamental characteristics. This post is by no means another ex post analysis of the reasons of current credit crisis, instead, it is about eight simple while crucial rules a risk manager or risk analyst must keep in mind (print out and post it on your PC). Sources are from http://www.geocities.com/mrmelchi/ rule.htm and http://nasdaq.riskgrades.com/clients/nasdaq/ edu_course.cgi?href=Module4-L2.html. Quotation 1.There is no return without risk. Rewards go to those who take risks. 2. Be transparent. Risk should be fully understood. 3. Seek experience. Risk is measured and managed by people, not mathematical models. 4. Know what you don't know. Question the assumptions you make. 5. Communicate. Risk should be discussed openly. 6. Diversify. Multiple risks will produce more consistent rewards. 7. Show discipline. A consistent and rigorous approach will beat a constantly changing strategy. 8. Use common sense. It is better to be approximately right, than to be precisely wrong.

Tags - risk , rule

Please read update at http:://www.mathfinance.cn

215

**Nine Ways to Implement Binomial Tree Option Pricing
**

Binomial tree model is almost the most popular yet easiest way for option pricing, for one thing, it can be used for most option classes in market, for example, European option, American option, Bermuda option, etc.; for another, Binomial tree is straitforward to implement, several lines are enough for a vanilla option. Besides, it has a not-bad convergence speed, read my old post A Simple Trick to Avoid Oscillation in Binomial Trees for improvement. But how many ways are you able to implement binomial trees? here is a pretty interesting paper on Nine Ways to Implement Binomial Tree Option Pricing, unlike Mr. espen haug's more than 30 languages collection of Black Scholes model, these nine ways are all runnable in Matlab only, and the difference among them is computational efficiency, below is a plot of execution times of the first five

here are the paper and matlab codes, you might feel in the end binomial tree implemention is not such easy . Enjoy. Tags - binomial

Please read update at http:://www.mathfinance.cn

216

**Wolfram Alpha Computational engine test feedback
**

No bigger news recently than Wolfram Alpha computational knowledge engine is finally available today, on 10/03/2009 I briefly wrote a post about what is wolfram alpha engine and what can it be used to service us, immediately after that, I applied to be a volunteer tester but got no reply. Anyway, it officially opens to public and we have chance to test its magic. When talking about the pros and cons of Wolfram Alpha engine and Google, different people will offer different opinions, some people take it for granted that Wolfram Alpha will be a big threat to Google and eventually replace Google, however, others hold that Wolfram Alpha is just a computation calculator, and no matter how powerful it is, it is at most a calculator with search function . Weighing up these two arguments, I would say they complement each other, for example, before you calculate an Europen option with Wolfram Alpha computational engine, you need to google at least what an Europen option is. In my previous post I joked about if Wolfram Alpha would return a result of "Black Scholes call option price with strike 10, asset price 10, time to maturity 1 year, interest rate 3%, and 25% annual volatility", alright, it turns out to be YES, just type "Black Scholes", you will get a form similar to the following graph Input your parameter and select option types, the value of option you set, together with its Greeks and plots, are calculated as

So far so good, but it seems the products Wolfram Alpha covers are limited, when I try to type Barrier option or Asian option, two simple exotic options, it says "Wolfram|Alpha isn't sure what to do with your input." there is no API users are able to add their own formulars, either. In brief, Wolfram alpha is a big step towards intelligent search engine, nevertheless, as it broadcasts at its main page: it is the first step in an ambitious, long-term project to make all systematic knowledge immediately computable by anyone.

Please read update at http:://www.mathfinance.cn

217

Tags . wolfram Please read update at http:://www.wolframalpha.mathematica .Play around at http://www.mathfinance.cn 218 .com/.

cfm http://www.zhaopin.com/ http://www. Tags .com/ http://www.mathfinance.com Germany & Switzerland: http://www.de/ http://www.de/ Asia (excluding China): http://quantfinanceasia.com/ http://www.stepstone.51job.wilmott.sg/index.com http://www.cn 219 .com/categories.job Please read update at http:://www.jobpilot.com/index.efinancialcareers.jobsdb.monster.com/Singapore/ http://www.jobstreet.monster.monster.net/ help me complete the list if you have sites I am not aware of.com. I share several sites I personally find useful: Worldwide: http://www.jobware.quantfinancejob.Quant job hunting related sites Since I have been looking for a quant-related job.com http://www.quantster.jobchina.com/bbs/forum-9-1.com.com/forum/ http://www.cfm?catid=5 http://www.de/ http://www.www.php http://www.html http://www.quantspot.html http://www. cheers.sg/directory.de/home_fs.sg/ http://app.asp?type=Work&id=14 China: http://quanthr.

the Gaussian GARCH model and the multivariate CCC-GARCH as simple. useful in particular for estimating conditional mean. The FGD model is fitted using conventional maximum likelihood together with a cross-validation strategy that determines the appropriate number of additive terms in the final expansions. An appealing feature of this expansion is that it is a nonlinear nonparametric model that directly nests the Gaussian diagonal VAR model. based on a given statistical procedure called base learner.altervista.nonparametric Please read update at http:://www. this is not the area i am family with at all.Nonparametric High-Dimensional Time Series Analysis Functional Gradient Descent (FGD) is a method of nonparametric time series analysis. the idea of FGD comes from the fact that boosting can be viewed as an optimization algorithm in function space. download at your own risk Tags .cn 220 .org/fgd/ PS: to be honest. Interested ppl shall download the Splus codes and data at http://www. FGD is a kind of hybrid of nonparametric statistical function estimation and numerical optimization. variances and covariances for very high-dimensional time series. This method employs an iterative refitting of generalized residuals. In fact.mathfinance. to approximate the first two conditional moment functions of a multivariate process. starting special cases.raffonline.

continuous piecewise linear payoff function on a stock.calculator Please read update at http:://www. So far the tool can only handle payoffs on a stock. where the payoff is denominated in the same currency as the stock.mathfinance.com/FETool/feapplet. You can use the tool to price and value option positions and simple structured products on a stock.cn 221 . Calculate your option at http://longvega.php Tags .The Long Vega Financial Engineering Tool This tool can replicate and price any non path-dependent. The Financial Engineering tool automatically replicates and prices a given continuous piecewise linear payoff function.

**Free Financial Spreadsheets
**

Long ago I shared a Financial Model Excel Spreadsheets Library by Thomas Ho, here is another long list of free financial excel spreadsheets for financial planning and analysis, although most of them are for corporate finance practitioners in my view, there are some samples which might be of your interest, for example: Risk Premium - Calculates the implied risk premium in a market. NPV & IRR - Explains Internal Rate of Return, compares projects, etc. Black Scholes Option Pricing - Excel add on for the pricing of options. Forex - Foreign market exchange simulation for Excel Breakeven Analysis - Pricing and breakeven analysis for optimal pricing Option Trading Workbook - Educational toolkit for using Excel for Options EVA Model - Template worksheets for calculating Economic Value Added (EVA) ... Download at http://www.exinfm.com/free_spreadsheets.html Tags - excel

Please read update at http:://www.mathfinance.cn

222

**ATOM C++ option calculator
**

Another derivative calculator shared with you, ATOM - Advanced Tool for Option Modelling is a C++ option calculator covers: price, implied volatility and Greek letters; Black-Scholes analytic formula; binomial tree lattice; Cox-Ross-Rubinstein parametrisation; Jarrow-Rudd equal-probabilitiy parametrisation; control variable technique; Broadie-Detemple penultimate node analytic approximation; Monte carlo simulation with the following variance reduction and normal sampling techniques: antithetic variable; moment matching, also known as quadratic re-sampling; Mersenne Twister pseudo-random numbers; Halton quasi-random numbers; Box-Muller polar normal inversion; Moro normal inversion; unlimited maximum number of steps in binomial trees and unlimited maximum number of trials and time intervals in Monte carlo simulations; exotic option support: Asian average price, binary cash-or-nothing and asset-or-nothing, chooser option; Download at http://www.atomproject.org/download.shtml Tags - calculator , option

Please read update at http:://www.mathfinance.cn

223

**Twitter of the week
**

One good way to keep updated of my latest quantitative finance collector entries is to subscirbe by RSS or email at the righ panel "RSS feed & subscribe" section, or if yor happen to use twitter, you can follow my twitter at http://twitter.com/a_biao, where i share my latest blog post and also my life & feeling of job hunting. For example, my latest one week twitters are: -----------------------------------------------------------------------------------------------------------------------i am drunken, seriously...about 1 hour ago from web # What Is Average Salary For A Financial Engineer? http://tinyurl.com/ dl5e8q3:44 PM May 2nd from TwitterFox # Stress test analysis http://tinyurl.com/dd5lob11:37 PM May 1st from twitterfeed # Interview is delayed to next week due to an unexpected meeting. Have a nice weekend and bank holiday9:03 AM May 1st from twidroid # Exotic Options Calculator http://tinyurl.com/csw7g85:48 AM May 1st from twitterfeed # Playing For Change | Song Around The World "Stand By Me", wonderful song http://vimeo.com/25397416:09 PM Apr 30th from web # Look forward to a quant risk role interview tomorrow.3:53 PM Apr 30th from twidroid # MU vs Arsenal, exciting...2:06 PM Apr 29th from twidroid # Got a short tel interview just now.11:46 AM Apr 29th from TwitterRide # Swine flu is in London3:21 PM Apr 28th from TwitterRide # My calibration is running overnight.8:06 AM Apr 28th from TwitterRide # Volatility Forecasting and Trading http://tinyurl.com/cgffv24:47 AM

Please read update at http:://www.mathfinance.cn

224

Apr 28th from twitterfeed # Why do only headhunters contact me? :)9:34 AM Apr 27th from TwitterRide # @cosbeta agree.7:34 AM Apr 27th from TwitterRide in reply to cosbeta # Terrible monday morning. Coupled ewma makes me dizzy.6:39 AM Apr 27th from TwitterRide # think about my future over several bottles of beer8:36 AM Apr 26th from web # prepare Tier 1 general5:56 AM Apr 26th from TwitterRide # finally finished exam, henghenghahie10:57 AM Apr 25th from TwitterRide # got lost, finally am here. waiting outside of classroom.7:13 AM Apr 25th from TwitterRide # on the train to univ of greenwitch for visa english test, have to leave uk if fails. bless myself. Tags - twitter

Please read update at http:://www.mathfinance.cn

225

**Stress test analysis
**

In recent months and years both practitioners and regulators have embraced the idea of supplementing VaR estimates with stress-testing. Today The Federal Reserve is postponing the release of stress tests on the biggest U.S. banks. Risk managers are beginning to place an emphasis and expend resources on developing more and better stress test analysis. Here is a good introductory paper aiming to give you a rough idea how to do stress test, to help demystify stress tests, and illustrate their strengths and weaknesses. The author use an Excel-based exercise with institution-by-institution data through stress testing for credit risk, interest rate and exchange rate risks, liquidity risk and contagion risk in the design of stress testing scenarios. The purpose of the workbook is to illustrate basic stress tests (and related tools) that can be used to assess risks in a small and relatively non-complex banking system, using a realistic (but fictional) example. Paper is available at http://papers.ssrn.com/sol3/ papers.cfm?abstract_id=973989&rec=1&srcabs=181931. Tags - stress-testing

Please read update at http:://www.mathfinance.cn

226

**Exotic Options Calculator
**

MG Soft Exotic Options Calculator is a freeware software to calculate the option value and greeks of vanilla and exotic options, mainly using Monte Carlo simulation.

The software supports the following types of options at the moment. Vanilla Options (using standard Black-Scholes formulae). Binary (Cash-or-nothing) Options (using standard analytical formulae). Asian Options (using Monte Carlo simulation). Barrier Options (using Monte Carlo simulation). Lookback Options (using Monte Carlo simulation). ... download at products_options_calculator.aspx Tags - calculator , exotic , option http://www.mgsoft.ru/en/

Please read update at http:://www.mathfinance.cn

227

**Finite Difference Method for EXCEL
**

Finite difference method has been repeatedly introduced to solve partial differential equation (PDE), for example, in past entries Crank-Nicholson finite difference solution of American option, Crank-Nicolson for a European put, PSOR for American option, etc. here is a Finite Difference Method for EXCEL addin which contains macro to solve numerically partial differential equations (PDE) and ordinary differential equations (ODE) with the Finite Differences Method (FD). Seems it can only be applied for two dimensional problem, but should be enough for normal cases me meet. Document and macro are at: http://digilander.libero.it/foxes/diffequ/ fdsolver_review.htm Tags - pde , finite-difference

Please read update at http:://www.mathfinance.cn

228

**Parisian option pricer
**

Parisian option might sound unfamiliar to you, it is basically a barrier option but becomes activated only after stock prices have spent a certain continuous, pre-decided time, called a window, above or below the barrier. One of possible motivations for the existence of the Parisian option, as stated in Haber, Schoenbucher, and Wilmott (1999) is: "...there is a need to make the option more robust against short-term movements of the share price..., in particular, it is far harder to effect the triggering of the barrier by manipulation of the underlying..." Taking an up barrier Parisian option as an example, the barrier time tau is defined as the length of time the stock prices have been above the barrier in the current excursion 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 Parisian option pricer at http://paul.wilmott.com/software.cfm, where the authors price Parisian options by a finite-difference solution of a three-dimensional partial differential equation. Tags - parisian , option

Please read update at http:://www.mathfinance.cn

229

**Volatility Forecasting and Trading
**

Excel spreadsheets of the course Volatility Forecasting and Trading taught by Professor Ser-Huang Poon at Manchester business school, mainly including: Estimation and Forecasts : What is Volatility? Volatility estimation Data frequency vs. reference period Realised volatility, quadratic variation and bipower variation Market microstructure issue Volatility Forecast and Evaluation Error statistics Test for significant difference Regression based efficiency tests Volatility Time series models Historical vol model Exponential smoothing, EWMA, Regime switching ARCH GARCH, IGARCH, EGARCH, GJR-GARCH Short vs. Long memory models Stochastic Volatility Models Extension to Multivriate and Jumps VaR (Value at risk) ... more about pdf lectures and excel sample codes are http://www.personal.mbs.ac.uk/spoon/ VolatilityForecastingAndTrading.htm http://www.personal.mbs.ac.uk/spoon/DataProgrammes.htm Tags - volatility at:

Please read update at http:://www.mathfinance.cn

230

SPD matrices. it does not include all of the capabilities of original f77 LAPACK. triangular.mathfinance. Download at http://math. Computational support is provided for supports various matrix classes for vectors. however. Emphasis is given to routines for solving linear systems consisting of non-symmetric matrices. and solving linear leastsquare systems.nist. banded. and tridiagonal matrices. symmetric positive definite systems.gov/lapack++/ Tags .LAPACK++: High Performance Linear Algebra LAPACK++: A Design Overview of Object-Oriented Extensions for High Performance Linear Algebra.cn 231 .algebra Please read update at http:://www. non-symmetric matrices. symmetric matrices. LAPACK++ (Linear Algebra PACKage in C++) is a software library for numerical linear algebra that solves systems of linear equations and eigenvalue problems on high performance computer architectures.

take a look if interested. The Innovative Forex Platform . Tags . In-depth Investing Analysis & Trusted Opinion. selected sources this week for you. finance jobs.mathfinance.Download for FREE! More than investment news.. feel relaxed now.. Join The Investing Social Network TradingSolutions: Financial analysis and investment software that combines technical analysis with neural network and genetic algorithms. finance career message boards and more. Ok. GET YOUR FREE TRIAL NOW! Finance Career: Learn about finance firm profiles.source Please read update at http:://www.cn 232 .Selected source this week Had a nice weekend? Just had an English test for UK Tier 1 General visa.

**Download historical stock price
**

A friend of mine asks me how to download stock historical price automatically with Excel, here are two ways I have played: 1, using Excel 2003/2002 Add-in to download from MSN Money Stock Quotes. This add-in for Microsoft Office Excel 2003 and Microsoft Excel 2002 allows you to get dynamic stock quotes from the MSN Money Web site. The add-in allows you to easily gather and study the stocks of interest to you. http://www.microsoft.com/downloads/ details.aspx?FamilyID=485FCCD8-9305-4535-B939-3BF0A740A9B1&displaylang=en 2, using the following macro to download from Yahoo finance. where you have to input start, end date and stock symbol Sub GetData() Dim DataSheet As Worksheet Dim EndDate As Date Dim StartDate As Date Dim Symbol As String Dim qurl As String Dim nQuery As Name Application.ScreenUpdating = False Application.DisplayAlerts = False Application.Calculation = xlCalculationManual Set DataSheet = ActiveSheet StartDate = DataSheet.Range("B1").Value EndDate = DataSheet.Range("B2").Value Symbol = DataSheet.Range("B3").Value Range("C7").CurrentRegion.ClearContents qurl = "http://ichart.yahoo.com/table.csv?s=" & Symbol qurl = qurl & "&a=" & Month(StartDate) - 1 & "&b=" & Day(StartDate) & _ "&c=" & Year(StartDate) & "&d=" & Month(EndDate) - 1 & "&e=" &_

Please read update at http:://www.mathfinance.cn

233

Day(EndDate) & "&f=" & Year(EndDate) & "&g=" & Range("E3") & "&q=q&y=0&z=" & _ Symbol & "&x=.csv" Range("b5") = qurl QueryQuote: With ActiveSheet.QueryTables.Add(Connection:="URL;" & qurl, Destination:=DataSheet.Range("C7")) .BackgroundQuery = True .TablesOnlyFromHTML = False .Refresh BackgroundQuery:=False .SaveData = True End With Range("C7").CurrentRegion.TextToColumns Destination:=Range("C7"), DataType:=xlDelimited, _ TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _ Semicolon:=False, Comma:=True, Space:=False, other:=False Range(Range("C7"), Range("C7").End(xlDown)).NumberFormat = "mmm d/yy" Range(Range("D7"), Range("G7").End(xlDown)).NumberFormat = "0.00" Range(Range("H7"), Range("H7").End(xlDown)).NumberFormat = "0,000" Range(Range("I7"), Range("I7").End(xlDown)).NumberFormat = "0.00" End Sub

In Matlab there is build-in function named "fetch" for requesting data from Yahoo! data servers. Tags - download , data

Please read update at http:://www.mathfinance.cn

234

**Neural Network source code
**

Neural network matlab source code accompanying the book Neural Networks in Finance: Gaining Predictive Edge in the Market by professor Paul D. McNelis. This book has got wonderful review like “This book clarifies many of the mysteries of Neural Networks and related optimization techniques for researchers in both economics and finance. It contains many practical examples backed up with computer programs for readers to explore. I recommend it to anyone who wants to understand methods used in nonlinear forecasting.”– Blake LeBaron, Professor of Finance, Brandeis University”. Presumably a worthyreading one. Download the Neural Network matlab source code and several paper at the author's webpage: http://www.bnet.fordham.edu/mcnelis/ recent.htm or try using TradingSolutions: Financial analysis and investment software that combines technical analysis with neural network and genetic algorithms. Download TradingSolutions Tags - neural-network

Please read update at http:://www.mathfinance.cn

235

Managing Diversification

Needless to say, diversification plays a pivotal role in investment, not only for risk management, but for return generation. Attilio Meucci and his colleagues have another wonderful paper on managing diversification: Quotation We propose a unified, fully general methodology to analyze and act on diversification in any environment, including long-short trades in highly correlated markets. First, we build the diversification distribution, i.e. the distribution of the uncorrelated bets in the portfolio that are consistent with the portfolio constraints. Next, we summarize the wealth of information provided by the diversification distribution into one single diversification index, the effective number of bets, based on the entropy of the diversification distribution. Then, we introduce the mean-diversification efficient frontier, a diversification approach to portfolio optimization. Finally, we describe how to perform meandiversification optimization in practice in the presence of transaction and market impact costs, by only trading a few optimally chosen securities.

Click for codes fileexchange/23271 Tags - diversification

http://www.mathworks.com/matlabcentral/

Please read update at http:://www.mathfinance.cn

236

**Forecast Volatility with Regime-Switching GARCH Models
**

Volatility estimation and prediction is crucial for risk management, for example, the portfolio's Value at Risk (VaR) and expected shortfall are partly decided by your volatility estimated, by partly I mean other factors, like dependence structure decide their values as well. GARCH model is one of the popular models for volatility estimation, you might argue volatility regime should also be included to your model given the totally different performance (hence different parameters) between low volatility regime and high volatility regime. Here is a good paper comparing a set of different standard GARCH models with a group of Markov Regime-Switching GARCH (MRS-GARCH) in terms of their ability to forecast the US stock market volatility at horizons that range from one day to one month. To take into account the excessive persistence usually found in GARCH models that implies too smooth and too high volatility forecasts, in the MRS-GARCH models all parameters switch between a low and a high volatility regime. Both gaussian and fat-tailed conditional distributions for the residuals are assumed, and the degrees of freedom can also be state-dependent to capture possible time-varying kurtosis. Download the paper and matlab codes at http://www.bepress.com/ snde/vol9/iss4/art6/. PS: In the codes the author multiply returns by 100 for optimization (hopefully for a faster convergence), I personally found the parameters are unstable with the change of this number. no idea if it is my data problem. Tags - garch , regime

Please read update at http:://www.mathfinance.cn

237

**Scholarship to apply for
**

ALMOST NOTHING POSITIVE, these are the most heard words recently whenver I have a talk with my former colleagues and classmates, as you might recall from my post "shit happens everywhere", I will lost my current job soon as well. Yes, it is true, i was told i could only stay in my office till the end of June, which means I have to either look for a new job, for instance, Finance Career: Learn about finance firm profiles, finance jobs, finance career message boards and more. , or find another way out, for instance, study for a MFE or PhD. Staying at university for a while is no doubt a good way to decrease the impact of credit crisis on you, since the job hunting competition gets tough and tough, even a humble position requires "ideally an applicant with PhD degree with 2 or more years work experience". How to choose a good MFE or PhD in QF program is natually a question everybody has before application, here by good program I mean good placement with accepted tuition fee (PS: I saw two weeks ago The University of Hawai’i Shidler College Of Business is offering one year Master of Financial Engineering program with scholarship available, search in Google if you are happy with the location). I happen to see such a rank, which might be suggestive to you, although this rank is too old,

After you are lucky enough to get an admission from one of these Top programs, you might wonder how to arrange money for enrolling in a graduate school? Is money a real concern for you? Getting an admission to a graduate is not an easy job but the big cheese is to collect money to pay tuition. All students would be pleased to recognise that state and private lenders offer awards and scholarships for you. It doesn't matter whether you have just finished undergraduate level or have been working for some years. The scholarships are available almost for all but standards changes within financial institutions. Some lenders award on merit basis with a proved track record in undergraduate school and some grants are provided on the basis of the amount required for the full graduate school degree program. To apply for a scholarship is not that easy as it looks to be. one source to search and apply for a scholarship I have ever tried is Find scholarships today at ScholarshipExperts.com providing US & international students with customized scholarship info!

Please read update at http:://www.mathfinance.cn

238

, should you are interested, please take a try. Good luck to all of you (including me) for job hunting or graduate school application. Enjoy life. Tags - scholarship , mfe

Please read update at http:://www.mathfinance.cn

239

**Salih Neftci (1947-2009) passed away
**

Bad news for all of us, Professor Neftci passed away yesterday in Geneva.

He is a such an important person to my quant-related life, his book Introduction to the Mathematics Of Financial Derivatives is so clear and easy to understand for anybody without any stochastic background, which helped me to work through my first master thesis at 2004; and his another book Principles of Financial Engineering is almost a mustowned one... Silent Salute! Tags - salih-neftci

Please read update at http:://www.mathfinance.cn

240

**Binary Option Calculator on Gphone
**

Equity Option Calculator on Gphone was shared in this post. The author has published a binary option calculator for Gphone, as the author's webpage says: Quotation Binary Option Calculator is for advanced options traders. Calculate option prices and Greeks for discontinuous payoff functions. Can price any combination of: Calls or Puts European or American style Cash-or-nothing or Asset-or-nothing Option value or Implied volatility.

To download, either search "Binary Option" on Gphone, or simply go to the author's blog http://jwdevg1.blogspot.com/2009/04/binary-optioncalculator-published.html Tags - gphone , calculator , binary , option

Please read update at http:://www.mathfinance.cn

241

black-litterman . Attilio Meucci. stress-testing. Paper "Fully Flexible Views: Theory and Practice" and Matlab codes are at http://papers.ssrn.Stress testing under Black Litterman framework Black Litterman model has been used largely for portfolio construction. Just finished an interview today.com/sol3/ papers.mathworks.com/ matlabcentral/fileexchange/21307. and perform. has a paper incorporating natually stress testing and scenerio analysis under Black Litterman framework. Balabala one and half an hour without even a detailed technical question. If you are totally fresh to Black Litterman model. among others. stress-testing Please read update at http:://www. going further step. etc. Most of paper on Black litterman are about how to construct an optimized portfolio.mathfinance. "I am 85% confident S&P 500 will have 5% excess return". fighting.cfm?abstract_id=1213325 and http://www. among others. and ranking allocation. and this portfolio can be adjusted under given risk constraint.cn 242 . click here.5% certainly". is BL allows users to input certain views under confidence level on assets. scenario analysis. Anyway. I suspect if it is really a Quant related job position or the desire the company indeed needs a people. one of the major differences with Markowitz mean-variance Efficient Frontier model. Tags . say. or "Bond index will outperform equity index by 1. they propose a unified methodology to input non-linear views from any number of users in fully general non-normal markets.

and testing for the presence of a threshold." with Allan Gregory. go there. for instance. Focusing on 3 publications "Tests for parameter instability in regressions with I(1) Processes. "Residual-based tests for cointegration in models with regime shifts. "Testing for two-regime threshold cointegration in vector error correction models. Journal of Econometrics (2002). Journal of Econometrics.Play with cointegration Cointegration is the foundation upon which pair trading (“statistical arbitrage”) is built. Should you are interested in playing with advanced cointegration test. estimating a threshold bi-variate VECM. Unit root and cointegration tests for time series data (urca) in R. Tags . for instance." Journal of Business and Economic Statistics (1992)." with Byeongseon Seo.mathfinance.cn 243 . (1996).cointegration Please read update at http:://www. basic cointegration function can be easily found in any popular statistical software package.

mathworks. where you can find parameter estimation for t-copula.html Tags . where the number of variables is large as compared to the number of observations. more paper and codes are at the author's homepage: http://www.com/matlabcentral/fileexchange/19751.mathfinance.cfm?abstract_id=1126401. the authors impose extra structure on the correlation matrix in the estimation process.copula Please read update at http:://www. another simple recursive routine to estimate by maximum likelihood the correlation matrix and the degrees of freedom for structured t-copula is shared at http://www.ssrn. asymmetric copula.com/sol3/papers.com/AttilioMeucci/Home/Home. etc.cn 244 .. The paper "Estimation of Structured t-Copulas" is available at: http://papers.Estimation of Structured t-Copulas A collection of codes on Copula estimation and simulation is shown here.symmys. Grouped-t copula.

ssc. In models for which there are more moment conditions than model parameters. Unlike maximum likelihood estimation (MLE). This is an important feature that is unique to GMM estimator. In some cases in which the distribution of the data is known. while I will have to stay at home preparing interview Tags . Only specified moments derived from an underlying model are needed for GMM estimator. GMM estimation provides a straightforward way to test the specification of the proposed model.cn 245 .html at Finally.wisc.GMM and Empirical Likelihood Generalized method of moments (GMM) estimation has got more and more popularity for linear and non-linear models with applications in economics and finance. and since has become one of the most widely used methods of estimation for models in economics and finance.edu/~bhansen/progs/progs_gmm.gmm Please read update at http:://www. MLE can be computationally very burdensome whereas GMM can be computationally very easy. The log-normal stochastic volatility model is one example. Download Programs for GMM and Empirical Likelihood http://www. GMM estimation was formalized by Hansen (1982). Happy easter day to all of you. GMM does not require complete knowledge of the distribution of the data.mathfinance.

http://www. and "optcosine". straightforward way to estimate density nonparametrically is kernel density estimator. in R a built-in function density() is for this.mathfinance. "triangular".Nonparametric Density Estimation A simple.html Tags . "Bandwidth Selection for Nonparametric Distribution Estimation" unpublished working paper (2004). "Nonparametric Estimation of Smooth Conditional Distributions" unpublished working paper (2004). with different kernel choices "gaussian".wisc.cn 246 . "biweight". for instance. "rectangular". "Interval Forecasts and Parameter Uncertainty" Journal of Econometrics (2006).density Please read update at http:://www. "cosine". take a look at the following papers and associated codes: "Exact Mean Integrated Squared Error of Higher-Order Kernels" Econometric Theory (2005). "epanechnikov".edu/~bhansen/progs/progs_np.ssc. Should you are unhappy with this function and eager for an extention.

heteroskedasticity and autocorrelation consistent covariance matrix" at 1987.htm Tags .ac.cn 247 .covariance http://www.ucl.mathfinance. Download at Matlabcode. another might be for the improvement of OLS regression when the variables have heteroskedasticity and autocorrelation. It rests on considerations of the so-called “frequency domain representation” of the Ft’s and also of a number of notions associated with nonparametric estimation procedures. Newey and Kenneth D.homepages. West in their paper "A simple. What is Newey West? it was proposed by the author Whitney K. positive semi-definite.uk/~uctprgi/ Please read update at http:://www. One possible application of Newey West estimator is for long run variance covariance calculation.Newey West estimator This function returns the Newey-West estimator of the asymptotic variance matrix.

php?option=com_content&task=view&id=19&Itemid=31 Tags . can we better estimate its long term variance by Allan variance? any idea? Allan variance Matlab code is easy to write and can also be downloaded at: http://www.mathfinance. Statistical theory for long term memory stochastic processes is largely different from the standard time series analysis." I am not quite convinced how to use Allan variance for stock returns.alamath. given stock return time series. named after David W.cn 248 . The Allen variance is a particular measure of variability developed for long term memory processes.variance Please read update at http:://www. "The Allan variance. which assumes short term memory. It is defined as one half of the time average of the squares of the differences between successive readings of the fractional frequency error sampled over the sampling period. is a measurement of stability in clocks and oscillators.Allan variance Long term memory has frequently been observed in time series. Allan. It is also known as the two-sample variance.com/ index. Taken from Wikipedia. that is.

gz file at http://www. Read Installation and Use Instructions. Black Scholes Option Valuation.php Tags .Black Scholes on excel Excel Add In (Visual Basic) for Black Scholes. Numerical Integration and Probability Density Estimation This is a MS Excel Add In (with Visual Basic Source Code) for several separated issues: 1.iimahd.in/~jrvarma/software.cn 249 . Probability Density Estimation Using Kernels 4.mathfinance. Golden Section Search for Max/Min 3. Numerical Integration 2. Download Excel Add-In and Visual Basic source code as a zip file or as tar. Implied Volatility and Option Greeks Many of these functions can also be used in standalone Visual Basic applications.ernet.black scholes Please read update at http:://www.

Securities 4.pwr. Alternative models Downloading at: http://www. Financial markets 3. Construction and pricing of exotic derivatives 9. and market statistics with a comprehensive review of time series models. swaps and options) 5. Market statistics 10. Term structure models 8.pl/~hugo/stronaHSC/ Podstrony/ksiazki/if_gb.im. Financial mathematics of discrete models 6.Financial Engineering Toolbox A toolbox accompanying the book "Financial Engineering: Derivatives Pricing. constructions and practical application of exotic options. futures. Financial mathematics of continuous models 7. Market Statistics".wroc. which provides a comprehensive overview of financial markets and a cutting-edge discussion of mathematical and numerical methods employed in financial engineering.mathfinance. Selected chapters: 1. (couldn't find the book on Amazon.html Tags . Introduction 2. The primary topics covered include: in-depth reporting of derivatives' pricing models.toolbox Please read update at http:://www. Basic derivatives (forwards.cn 250 . Computer Simulations. surprisingly).

It is indeed a frustrative position specially if you are seriously in need of financial help. a time of risk taking. A lot of pupils apply for for student credit cards at school. For those students who are less than 18 years of age accepted from the parents or the guardian is compulsory. College shall be a time of studying.cn 251 . real estate or even immediate payment loans. For them to make a credit card history they ought to have a credit card or at the least consume a history in paying back debts of whatever case. Student credit card is given to any member of the academic organizations disregarding whether he or she is part time or full time. Please read update at http:://www. From student loans to schoolbooks. working or learning in the United States. and a time of tension. Applying for a student credit card is suggested because it can help pupils in making their accredit history which might be useful in the future particularly in finding loans like automobile. Most of international students and scholars discover it actually hard to receive a credit card as they lack a credit card history. Most of those tensions stem from bills.Apply student credit card This is a review of week. university staffs either full time or part time faculty and executives who are 16 year old age and above. international students who are exchanging. undergraduate or graduate student.mathfinance. college life costs expensive.

I do enjoy dress down.cn 252 .flickr. which will last at least till tomorrow.mathfinance.Shit happens everywhere Today is the first day of G20 summit. Fortunately. nothing hurts us.com/search/ Tags . wearing jeans. however. there is still "hero" more pics can be ?q=london+protest&s=rec found http://www. those people are only a few. t-shirt and looking relaxed (although not).protest Please read update at http:://www. is also the strongest protest in the last fews days. I fully understand the feeling of losing job (I myself will be one of them soon). worse than hearing "fucking foreigners" in the broad street. Company suggests us to have dress down to avoid unnecessary conflict with protestors. (for those of you who have no idea what's happened or how seriou this protest is in London recently. everyone has the right to speak out his or her own views. Protest itself is fair enough and welcomed. this is a kind of freedom we should cherish. what I can tell you is the slogan of a protestor group being "Burn a banker"). as foreigners. this should never be an excuse of blaming other people. shit happens everywhere. but freedom does not mean you can do anything you want.

nigloglik . 5.NIG cumulative distribution function (cdf). 3.(Alpha-)stable cumulative distribution function (cdf).Autocovariance function of an ARMA process. nigcdf . edftests . stabreg .Empirical cumulative distribution function (cdf).cn/2009/04/modeling-andforecasting-electricity-loads-and-prices-a-statistical-approach-the-wileyfinance-series-hardcover/ Tags . Selected functions are: armaacvf .pwr. Tests and goodness-of-fit functions.Regression parameter estimates of a stable distribution. Time series. here is a new MFE Matlab toolbox accompanying the book "Modeling and Forecasting Electricity Loads and Prices: A Statistical Approach". toolbox Please read update at http:://www. Markov regime switching (MRS) models. which is grouped into the following seven categories: 1.wroc. nigpdf .NIG probability density function (pdf). average .Quantile parameter estimates of a stable distribution.Moving average with rolling volatility daily data decomposition. 7. rollingvol . 6. matlab .Empirical distribution function (edf) goodness-of-fit statistics (Kolmogorov and Anderson-Darling). decompB . stabcull . Data files.Annual rolling volatility.Weighted average.html More about the book at: http://www. Demos. GUI functions.im.mfe . 4. hypest .cn 253 . nigest . empcdf . stabcdf .pl/~rweron/ MFE.mathfinance.NIG log-likelihood function.riskey. Distributions.Estimate parameters of the NIG distribution. 2.MFE toolbox Oxford MFE package was shared there.Estimate parameters of the hyperbolic distribution. Downloading the toolbox at: http://www.

Historical Stock Prices: http://finance. Historical FX Rates: http://oanda.data Please read update at http:://www. Some Implied Volatilities: http://www.org/forum/ showthread.cn 254 .com/q/hp?s=yhoo 4. for more please check pages http://www.php?t=2159 and http://www.BBA LIBOR 5. Delayed Commodities: http://www.gov Tags .com/ messageview. For instance: 1.com/convert/fxhistory 3.British Bankers' Association .liffe-commodities.yahoo.cfm?catid=19&threadid=14748. SEE MORE 2.ivolatility. 7. Here is a list of free financial data for downloading.com 6.wilmott.sec.mathfinance.Financial data download Financial data is the center of quantitative finance research.quantnet. ADVFN offer FREE streaming stocks and shares data form around the world. US Fundamentals: http://www. undoubtedly. Recent LIBOR rates: BBA . enjoy.com.

Moreover. To download FastICA and more about the book Independent Component Analysis check http://www. Independent component analysis (ICA) or blind source separation is a modern signal processing technique to multivariate financial time series such as a portfolio of stocks to multivariate financial time series such as a portfolio of stocks. the book can be bought at Amazon through: Independent Component Analysis Tags .multivariate Please read update at http:://www. The key idea of ICA is to linearly map the observed multivariate time series into a new space of statistically independent components (ICs).Independent Components Analysis The FastICA package is a free (GPL) MATLAB program that implements the fast independent component analysis. This can be viewed as a factorization of the portfolio since joint probabilities become simple products in the coordinate system of the ICs. and so forth. The major difference between Independent component analysis and more familiar principal component analysis (PCA) is in the type of components obtained. What's more. The goal of PCA is to obtain principal components which are uncorrelated. PCA algorithms use only second order statistical information (variance dominates). the aim is to obtain statistically independent components.mathfinance. On the other hand.hut. PCA gives projections of the data in the direction of the maximum variance. ICA algorithms may use higher order2 statistical information for separating the signals. In ICA however.fi/projects/ica/ fastica/. The principal components (PCs) are ordered in terms of their variances: the first PC defines the direction that captures the maximum variance possible. the second PC defines (in the remaining orthogonal subspace) the direction of maximum variance.cn 255 .cis.

mathfinance. The pricer also calculates option sensitivities (Greeks). Yesterday I downloaded a free application named Equity option calculator. Have fun. Publisher's blog: http://jwdevg1.blogspot. this option pricer can be found by typing "equity option calculator" in Market. gphone . Alternatively enter a ticker and let the market data calibrator fill in pricing parameters. a simple equity options pricer for European style no dividend calls and puts using your own inputs under Black Scholes model framework. it is fun to play a derivative calculator wherever as you go. news. Another shining point of Gphone is its Android platform and Market. option Please read update at http:://www.cn 256 . 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. finance. where people can publish applications on entertainment. weather. Although the supported options are limited. its main attraction to me is Gmail everywhere as long as there is signal since I can't use Gmail box with my PC at company (my boss won't read my blog). if you happen to own a Gphone.Equity option calculator on Gphone I bought a Gphone several months ago. isn't it? the code is written in Java that I am not familiar with.com/ Tags . solve for the option value or implied volatility.calculator . etc.

For more detail please check http://transp-or2.Kernel principal component analysis EasyPCA is a small educational program intended to help to understand how the Principal Component Analysis (PCA) algorithm works. It has been coded in a very modular way in order to make it easy to understand the code.ch/pagesPerso/ javierFiles/software.pca Please read update at http:://www.cn 257 .php Tags .epfl. and is a common technique for finding patterns in data of high dimension.mathfinance. PCA is a useful statistical technique that has found application in fields such as face recognition and image compression.

From a simple homepage to a fancy WEB2. You may be an cyberspace seller who prefer to bring affiliate or marketing to the advanced level. There are a lot of free lunch services that will allow you produce a personal website to share experiance or make friends online.cn 258 . You might be a SOHO work-at-home self-employee who would like to make additional revenue for yourself. Nevertheless. if you prefer to create website that looks appealing or more professional. Disregarding what you wish to do on internet you're likely becoming to need to understand how to make a website that operates. While it refers to constructing websites there's many confusion about the best method to do. However. Please read update at http:://www.0. BlueVoda is a drag & drop Web site builder that enables a user with almost no experience to build a fantastic Web site. You are perhaps a modest enterprise owner who already holds a website. it is crucial to choose what your purpose is prior to do it. even before you register a host name! Should you just prefer to "set up a website" and do not concern whether or not it gets any visitor or has any possibility to make you an income. you can also own one with few simple steps.mathfinance. No HTML. that's easy. you will have to plan a little more carefully.Create your own websites This is a review of the week. PHP or any other coding knowledge is demanded.

one that continues to be widely used by financial theorists.S. then take the square root of that value and multiply by 100 to get VIX.google. vix Please read update at http:://www.com/micro/vix/ vixwhite. and estimates expected volatility by averaging the weighted prices of SPX puts and calls over a wide range of strike prices. The new VIX is based on the S&P 500 Index (SPX). Now VIX is used to reflect a new way to measure expected volatility.VIX calculation CBOE Volatility Index.mathfinance. VIX.com/Doc?id=ddb2j6dw_12fjk57bfx Tags . Introduced by this paper http://www. Calculate volatility for both near-term and next-term options. this new methodology transformed VIX from an abstract concept into a practical standard for trading and hedging volatility. Calculate the 30-day weighted average of variance. was originally designed to measure the market’s expectation of 30-day volatility implied by at-the-money S&P 100 Index (OEX) option prices. the core index for U. risk managers and volatility traders alike.pdf. By supplying a script for replicating volatility exposure with a portfolio of SPX options. Matlab code: http://docs. VIX calculation is done step-by step as: 1). 2). equities.cn 259 .cboe.volatility . 3). Select the options to be used in the VIX calculation.

I make a PDF file which includes so far most of entries of the Quantitative finance collector blog.com/a_biao.twitter.mathfinance. You can distribute this list as you want. apparently many codes can not be used directly for a certain purpose. please visit my blog or follow my twitter at http://www. downloading and using are at your own risk. Most of the entries were written when I was at university. the only wish from me is please ’do not change the sentences’ and leave the original links when you want to post somewhere. Although I try best to check each file before recommendation. certainly. thank you. This Quantitative finance codes list is partly what I have collected during my financial engineering learning journey.cn/attachment/ QuantitativeFinanceCollector. learn the way the coders applied.Top Quant codes collection you shouldnt miss To search and backup easier. Should you are interested and would like to track my latest collection.mathfinance. we can. Downloading the PDF file at: http://www.pdf (right click and save as) Please read update at http:://www.cn 260 .

The authors first briefly review the principles of pricing by no arbitrage in a binomial tree.math.dk/~rolf/REV. then move to continuous-time model .Option pricing with excel A nice paper on step-by-step option pricing with excel. which are Monte Carlo simulation and Finite difference for Partial differential equation (PDE). option hedging is introduced.mathfinance.pdf Tags .Black scholes pricing model. VBA codes are included in the paper as well. Download paper "Option pricing with the http://www. advantages and disadvantages of spreadsheets in general and Excel in particular are analyzed shortly.cn 261 . after a short discussion on the parameter estimation issues.option . excel Excel" at Please read update at http:://www. at last. they turn to two numerical methods for pricing.excelpaper.ku. and show how this can be implemented in Excel.

therefore it's not actually a problem. You'll have to own a Web site that allows more than what you are able to do on free services. you may not prefer to utilize the free services. If you are not blogging and you're indeed marketing a product or service. Please read update at http:://www.mathfinance. is the hosting. Take a look if you have plan to own a site in the near future. it is meaningless to have a domain name should you do not go forward and make a site on it. though. however they concern about the cost. around 10 US dolloars you can get a fancy dot com name. and do something to earn revenue. For instance. What's crucial. Even if you are merely blogging.Cheap web hosting solution This is a short review of web hosting.cn 262 . Purchasing the real domain name is really cheap. and they aren't really expensive. begin appealing subscribers and customers. and the best way for most people is to use the Web Hosting service that accompanies the host name. Many folks would like to own Web sites nowdays. you truly can not bear free hosting. most probably. although. There are dozens of ways to acquire that hosting. 4 Cheap Web Hosting is a guide to the best rated affordable web hosting packages available online. Numerous corporations who sell domain names feature these hosting packages.

. . . . . . . . . . . . . . .2 LM Serial Correlation Test: lmtest1 . . . . . . . . . . .2. . .1 Sample Autocorrelations: sacf . . . . . . . . . . . 21 1. 17 1. .2. . . . . . . . . . . . 29 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .mathfinance. . . . . . . . . . . . .cn 263 . . . . . . . . . . . . . . . . .5. . . . . .4. . . 40 3 Vector Autoregressions 43 Please read update at http:://www. . . . . . . .4 Sample autocorrelation and partial autocorrelation . . . . . . . . . .6. 9 1.5 Theoretical autocorrelation and partial autocorrelation . . . .1 Ljung-BoxQ Statistic: ljungbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Simulation: armaxfilter_simulate . . . . .1 ARMA Simulation 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 2. . . . . . . . . . . . . . . . . . 37 2. . . . . . . . . . . . . . . . . . . . . . . . . 23 1. . . . . . . . .3 ARMA Forecasting . . . . . . . .1 Forecasting: arma_forecaster . although in its current form it only contains univariate routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4. 27 1. . . . . . . .2 Residual Plotting: tsresidualplot . . . . . . . .2 ARMA Partial Autocorrelations: pacf .3 Characteristic Roots: armaroots . .2 Augmented Dickey-Fuller testing with automated lag selection: augdfautolag . . . . . . . . . . . .1 ARMA Autocorrelations: acf . . . . . . . . . . . . . It has been widely used by students here at Oxford. . . . . . . . . . . . . . . . . . . . . . . . . . .1. . . . . . . .2. . . 5 1. 27 1. . . . . . . . . . . . . . . . . . . . Contents include: 1 Stationary Time Series 5 1. . . . . . . .2.1 Augmented Dickey-Fuller testing: augdf . . 33 2 Nonstationary Time Series 37 2. . . . . . . . . . . . . . . . . . . . . . . . . .6 Testing for serial correlation . . . . . 19 1. . . . . . . . . . . . . . .1 Estimation: armaxfilter . . . . .2 ARMA Estimation . . . . 31 1. 31 1. .6. . . . . . . . 15 1. . . . . . . . . . . . . .5. . . . . . . .1. . . 23 1. . . . . . . . . . . . . . . . . .3.2 Sample Partial Autocorrelations: spacf . . . . . . 21 1. .1. . . . . . . 25 1. . . . . . . . . . . . . .Oxford MFE UCSD GARCH toolbox The Oxford MFE Toolbox is the follow on to the UCSD GARCH toolbox. . . . . . . . . . . . . . . . .1 Unit Root Testing . . . . . . 9 1. . . . . . . .4 Information Criteria: aicsbic . . . . . . . . . . . and represents a substantial improvement in robustness over the original UCSD GARCH code. . . . . .

. . . . . . .2 Some behind the scenes choices . . . . . . . . . . . . . . .1. . . . . . .2 Granger Causality Testing: grangercause . . . . . . 50 3.1. . . 66 5 Density Estimation 71 5. . . . . . . . . . . . . . . . . . .1 ARCH/GARCH/GJR-GARCH/TARCH/AVGARCH/ZARCH Estimation: tarch . . . . . . . .1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 3. . . . . . . . . . . . . . . . . . . . . . . . . . .1. .1 Kernel Density Estimation . . . . .3 EGARCH Estimation: egarch .1 GARCH Model Estimation . . . . . . .com/wiki/MFE_Toolbox Tags . . . . .1. . . 59 4. .3 Impulse Response function calculation: impulseresponse . . . . . . . . . . . . . . 53 4 Volatility Modeling 57 4. . 57 4. . . . . . . . . . . . . . . . . . . . .4 APARCH Estimation: aparch . . . . . .kevinsheppard.cn 264 . . . . . . . 71 Code and documention are available http://www.mathfinance. . . . . . . . 57 4. . . . . . . . . . . . . .1. . . . . .1 Stationary Vector Autoregression . . . . . . .1. . . . . . . . . . . . .1 Vector Autoregression estimation: vectorar . 63 4. 43 3.3.garch at: Please read update at http:://www. . . . . . . . . . . . . . . . . . . . . . .

quant salary is exicting.mathfinance.com/documents/Hudson-Asia-Banking-FinancialServices-Salary-Information.hudson. http://china. The figure looks not bad at all.81% 150K ~ 200K 7. focusing on Banking and Financial services sector. given the terrible market of 2008. especially in China. China.72% Considering the average annual salary for Chinese fresh master graduates is about 60K. other income exceeding salary is pretty possible.89% >300K 37.cn 265 .salary Please read update at http:://www.pdf. I also had a survey for quant salary in mainland. isn't it? Tags .02% 200K ~ 300K 7. about 1~3 years work experience in Chinese Yuan): number percentage of voters 50K ~ 80K 11.Quant salary Hutson has published its quant salary survey results in Asian market.89% 100K ~ 120K 5.26% 120K ~ 150K 22. results are shown below (basic salary + bonus.4% 80K ~ 100K 7. I have to say for many cases the quant salary does not mean the exact number the quant get.

saving.and cost.Video lectures Just share with you guys two free online video lecture sites I have recently used.cn 266 . both time.net/Top/Computer_Science/Machine_Learning/ http://videolectures. isn't it? enjoy. http://videolectures.video Please read update at http:://www.mathfinance.net/ Tags .

cn/Grouped-T-copula-simulation-estimation/ shared a sample code for grouped-t copula simulation.html Tags . it has limited applications especially in the area of credit risk. 2006. Interested reader shall refer to the following papers and Matlab codes for detail: Modelling Asymmetric Exchange Rate Dependence. several copula estimation and simulation package can be found. Slides June01 (PDF).duke.mathfinance. asymmetric Please read update at http:://www. For example.copula . International Economic Review. most of the case we talk about an exchangeble copula due to its relatively easier to explain. or derivative markets where asymmetric dependence plays a crutial role.The Joe-Clayton and symmetrised Joe-Clayton copula density functions can be found here (PDF).edu/~ap172/research. clearly the dependence is stronger in left-up corner than right-down corner. Such rebalancing behavior would also lead to greater dependence during depreciations of the DM and yen against the dollar than during appreciations.S. Discussion Paper 01-09. 527-556. It is certainly natural to enquire whether there are extensions that are not rigidly exchangeble. would lead the Bank of Japan to intervene to ensure a matching depreciation of the yen against the dollar whenever the Deutsche mark (DM) depreciated against the U. University of California.cn 267 .mathfinance.Asymmetric copula analysis http://www. with German exports to the United States. But. a desire to maintain the competitiveness of Japanese exports to the United States. http://econ. further. San Diego.This paper was previously circulated as “Modelling Time-Varying Exchange Rate Dependence Using the Conditional Copula”. A scatter plot of the return of S&P 500 index and that of its implied volatility difference series is shown above. dollar. 47(2). Matlab functions for these can be found here. Paper (PDF). -. Code (MATLAB) -. Abstract (HTML). however.

. american_option_fudge: approximates the value of American Options as the value of the corresponding European option.option . Click for more and downloading http://acumenconsultinginc. real > : This class is a child class of Bisection.cn 268 . is available.. The algorithm converges faster because it changes from the bisection to the secant algorithm /// on every other iteration european_option_pair : Black Scholes option pricing formulae for puts and calls . including: american_option_approximation: uses the Black Scholes formulae for European options. specifically. a derivative calculator source code.net/ TechNotes/public_options/html/annotated.html Tags . c++ Please read update at http:://www.mathfinance. plus the addition of a fudge factor binomial_option: typical binomial tree to price option value Bisection_Secant< functor.c++ for finance A c++ class list for finance. to approximate the values of American options.

WolframAlpha computational knowledge engine You might have no idea who is Wolfram. What is Wolfram|Alpha? its own logo says WolframAlpha is a computational knowledge engine. asset price 10. currently we can't test its efficiency and how magic it is. Instead.mathematica . or MSN live does. wolfram Please read update at http:://www. interest rate 3%. Since the project will only be available for public after May. A recent post of his blog shows his another more ambitious project named Wolfram|Alpha will be available in May. Anyway.com/ please check it at: Tags . like the Wikipedia. and it isn't only a giant database of knowledge. and 25% annual volatility"? LOL. should you be interested. Can it return the value of "Black Scholes call option price with strike 10. http://www. It doesn't simply return results that contain (match) the keywords you search.mathfinance. it is a (computation + search) engine. right. 2009. Yahoo.wolframalpha. Wolfram Alpha indeed computes the answers to the question you type in the "search" form. time to maturity 1 year. I am too demanding. like Google. Wolfram is the computer scientist who has developed Mathematica. but you might know Mathematica more or less.cn 269 . Simply put.

We investigate maximum likelihood estimation of the square root process (CIR process) for interest rate time series.cn 270 . we added Quant newssection where selected news and resources. PDF file with Matlab codes included: http://dsp.cox ingersoll ross Please read update at http:://www.cz/ konference_matlab/MATLAB07/prispevky/kladivko_k/kladivko_k. focusing on Asian Quant markets. In addition. The MATLAB implementation of the estimation routine is provided and tested on the PRIBOR 3M time series.Maximum likelihood estimation of CIR interest rate Quotation The square root diffusion process is widely used for modeling interest rates behaviour. Tags . we moved all codes collection posts under category Quant code.mathfinance. Hope this change won't bring trouble to you.vscht. thanks. which makes browse easier and more convenient (hopefully). It is an underlying process of the well-known Cox-IngersollRoss term structure model (1985). will be published.pdf For those intested: a small re-organization of the blog has been undertaken.

The exercise payoff of a compound option involves the value of another option. an option on stock of a levered firm that expires earlier than the maturity date of the debt issued by the firm can be regarded as a compound option on the firm value (Geske.mathfinance. Attached is a sample matlab code computing the value of a compound call option with the Black-Scholes pricing model using Geske's analytic formulas. The pricing of many other derivative instruments can be modeled as compound options. The new call has expiration date T2 and strike price X2. The decision depends on whether the stock as a call on the firm value is more valuable than the strike price. option Please read update at http:://www.compound . 1979). On the first expiration date T1. the holder chooses to acquire the stock or otherwise.cn 271 . On the expiration of the option (the first expiration date of the compound option). the holder has the right to buy a new call using the strike price X1. By visualizing the underlying stock as an option on the firm value. A compound option then has two expiration dates and two strike prices. Take the example of a European style call on a call.Compound option pricing A compound option is simply an option on an option. Click to download Tags .

have only ramped up a huge pile of debt for the ordinary cardholder. In recent years. There is nevertheless.credit . no more taxpayer bucks are ill-used. It appears as if day-to-day at present that we hear about a government bought at bailout of additional major company.Credit card bailout A review of credit card bailout. bailout Please read update at http:://www. there is really no money needed in this bailout. subsidy. Through debt elimination. a person can lawfully and entirely discharge 100% of their debts from credit cards and consumer loan*.mathfinance. Totally without afresh loan. Numerous smaller commercial enterprise. fast food meals. are left enquiring where is their bailout from the dishonest loaning practices of the depository financial institution and credit card corporations. This is not much unlike the debt built up by companies. consumers have been promoted to Apply Credit Card for daily purchases. As a matter of fact. calling for for help. All of these purchases. who now bear their hand out. at the long-run expense of the American taxpayer. This isn't a government platform. And the government appears very amenable to offer that help.cn 272 . including groceries. in addition the interest and fees appended. a bailout of forms for personal credit card debt. and even the morning cup of coffee en route to office. and you will not find out about it on the nightly news show. Tags . or government takeover. as well as individual people.

Background As the CDS market evolves to trade single name contracts with a fixed coupon and upfront payment.cn 273 . a Yield Curve Specifications PDF file about how the yield curve is constructed and calculated is also available at the webpage.cdsmodel. 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. 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.com/ Tags .CDS Standard Model JP. enjoy! http://www. Morgan has release its CDS pricing and analysis model code! 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. credit Please read update at http:://www.cds . Besides the code for CDS.mathfinance. The source code is copyright of ISDA and available under an Open Source license.

surface .cn 274 .amadeo.volatility . they discuss how this framework can be used in applications of option pricing and risk management.Modelling the implied volatility surface The volatility surface implied by option prices presents a structure that changes over time. The aim of this paper is to present a framework to model the implied volatility of the FTSE options in real time.name/working_papers/ volatility_surface_may04. Paper and attached matlab/VB/mathematica http://www. smile codes: Please read update at http:://www. 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.mathfinance.pdf Tags .

test Please read update at http:://www.r-project. test it. crash.org/library/unittest.de/Main_Page for Matlab http://docs.html for R. and so on.cn 275 .dohmke.python. the most popular amongst these is xUnit which has implementations in most modern programming languages. It helps you catch bugs early by allowing frequent retesting of your code as you develop. Tags . higher quality of code and software. provides documentation of which functionality has been tested. This prevents code "regressing" in the sense of reintroducing previously identified and fixed bugs in later updates to your code. For Matlab we have a version of mlUnit available for your use. Is there an automatic testing tool doing these boring. repetitive procedures for you? YES.code .Automatic Code Testing Everyday you write your quantitative finance code. greater confidence to make changes to existing code since unit tests will catch incompatibilities early. Sounds nice? Downloading packages at: http://mlunit. Automatic Testing is a great tool to increase productivity and save time. then modify it. test the code. Main Benefits: much less time spent chasing bugs and debugging. In python.org/web/packages/RUnit/index. maybe crash again. For R there is RUnit. Automatic Testing is made simple and quick through the use of unit testing frameworks.mathfinance. pyUnit is part of the standard library and is available as a standard package unittest.html for Python http://cran.

downloading link and userguide are at:http://mlproj.cn 276 . • open. The features include • add a new project. • open files in the MATLAB editor. mlProj is a tool for managing MATLAB projects. sub-projects are created and some files are inter-correlated among those sub-projects. but with the expanding of project. I was tired of looking for them one by one. Is there a project management tool like Visual C++ does for cpp/hpp? mlProj is one good application I recently found. It considers • all opened m-files.mathfinance.de/ Main_Page Tags . save and close projects. The projects are shown as a tree. which are saved when a project is closed. • the MATLAB path. It therefore becomes unrealistic to separate those files any more.dohmke. • all figure windows.Managing MATLAB Projects Whenever I opened my m files with Matlab. the situation became worse for a big project with dozens of small m files. directories and projects.matlab Please read update at http:://www. and • the MATLAB workspace. • reload the tree view. You might argue what we can do is to save all files of one project at a separated directory. and loaded when the project is opened. well. that’s what I did. which provides simple access to directories and files of the active project. • rename files and directories. and • add user-defined items to the mlProj menu. • delete files.

html Tags .. ..wavelet Please read update at http:://www. A partial list of the techniques made available: orthogonal and biorthogonal wavelet transforms...edu/~wavelab/ Wavelab_850/index_wavelab850. downloading at http://www-stat.stanford. matching pursuit.wavelet analysis WaveLab is a collection of Matlab functions to implement a variety of algorithms related to wavelet analysis. translation-invariant wavelets. cosine packets.mathfinance. interpolating wavelet transforms.. wavelet packets.cn 277 .

http://tradingwithmatlab. let alone volatility (I mean. stochastic volatility.cn 278 .volatility .mathfinance.Historical Volatility Estimation Dozens of ways to calculate historical volatility. stochastic Please read update at http:://www.).blogspot.com/2008/06/estimatehistorical-volatility.html Tags . Here is the MATLAB code that one could use to estimate historical volatility using different methods Historical Close-to-Close volatility Historical High Low Parkinson Volatility Historical Garman Klass Volatility Historical Garman Klass Volatility modified by Yang and Zhang Historical Roger and Satchell Volatility Historical Yang and Zhang Volatility Average of all the historical volatilities calculated above Enjoy. implied volatility. for instance.

for Kalman filter Independent Components .for minimum-entropy (maximum certainty) partitioning Extreme Value Theory .uk/~sjrob/Outgoing/ software.for estimating various temporal and spatial signal complexities Denoising .for analysis of Gaussian mixture models for data set clustering etc.for ICA based on `accelerated' covariant algorithm (natural gradient) Gaussian mixture models . extreme Please read update at http:://www.for detecting novelty using extreme value theory Publications also are at: http://www.filter .for removing noise from signals Kalman filter .robots.cn 279 .mathfinance. including: Complexity . MinEnt clustering .html Tags .Several matlab packages Several matlab packages to download.ox.ac.

au/staff/dunn/glmlab/glmlab. inverse Gaussian. glmlab includes the following error distributions: normal (Gaussian).edu.sci. and binomial. http://www. glmlab can fit all types of generalized linear models.cn 280 .usq. You can also specify your own error distributions with just a little bit of MATLAB programming.regression Please read update at http:://www.html Tags . gamma. logistic regression. including (among others): multiple regression. Poisson. log-linear models.mathfinance.Generalized Linear Models in Matlab glmlab is a free MATLAB toolbox for analysing generalized linear models. and weighted regression.

Matlab implementation of cointegration tests Matlab of the paper "Implementing Pesaran-Shin-Smith" This first year paper is based on Pesaran et al. this paper is concerned with implementing the mentioned test statistics in a Matlab routine. by first introducing a VAR model.zeugner. finally.eu/arbeiten/tafel. the test statistics and their asymptotic distributions. Paper and Matlab code: http://www. this paper focuses on the derivation of the corresponding cointegrating rank tests.php Tags . subsequently deriving the likelihood for the cointegration parameters and. (2000).mathfinance. In addition. (2000) who generalise the cointegration tests introduced by Johansen to include exogenous I(1) variables in a VECM model. The final section introduces tests on whether the required exogeneity restrictions hold. It reiterates the proofs for their central test statistics and presents them in a less dense format: Following Pesaran et al.cointegration Please read update at http:://www.cn 281 .

Pattern Recognition Package Pattern recognition is a sub-topic of machine learning. features selection.mathfinance. Matlab package and manual are available at http://www. This is in contrast to pattern matching.Most research in pattern recognition is about methods for supervised learning and unsupervised learning.org/ download. It includes procedures for data generation. another black-box as neural network. linear and non-linear feature extraction. training classifiers.pattern Please read update at http:://www.html Tags . evaluation and visualisation. where the pattern is rigidly specified. combining classifiers.prtools. cluster analysis. The patterns to be classified are usually groups of measurements or observations. Pattern recognition aims to classify data (patterns) based either on a priori knowledge or on statistical information extracted from the patterns. PRTools supplies about 200 user routines for traditional statistical pattern recognition tasks. density estimation.cn 282 . defining points in an appropriate multidimensional space. It is "the act of taking in raw data and taking an action based on the category of the data". It is intended to aid students and researchers in designing and evaluating new algorithms and in building prototypes.

Or it can be combined with statistical data mining techniques for high-frequency trading strategies.cn 283 . Note: 1.Quant Trading Strategy Demo A Quant Trading Strategy Demo. Explainations and some related VBA code will be published in: http://www. DPE (Dynamic Protected Envelope) and DPAA (Dynamic Protected Asset Allocation) Download at: http://www. 2. including: CPPI (Constant Proportional Portfolio Insurance). OBPI (Option Based Portfolio Insurance). it can be combined with factor and fundamental analysis for more specific low-frequency trading strategies. This is purely quant asset allocation strategy.quantcode.weizhenstanford.php?cid=9&lid=508 The underlying risky asset (can be equity or fixed income instruments) are simulated via general innovation processes with specification of stochastic volatility.com/blog Tags .mathfinance.strategy Please read update at http:://www.com/modules/mydownloads/ visitwad.

however. research and applications development. 1995) Download. Please help me write a review if you can.Feedforward neural networks package Some call it "probably the best feedforward neural networks package". I can't gurantee it.ncrg.aston.uk/ netlab/index. Bishop.php. The Netlab toolbox is designed to provide the central tools necessary for the simulation of theoretically well founded neural network algorithms and related models for use in teaching. (Oxford University Press.cn 284 . overview and example are at http://www. It consists of a toolbox of Matlab® functions and scripts based on the approach and techniques described in Neural Networks for Pattern Recognition by Christopher M.neural-network Please read update at http:://www. as I know almost nothing about neural network. cheers.mathfinance. Tags .ac.

Sample from Dirichlet-multinomial (Polya) distribution. % % Other % gamma_fit .Inverse of the digamma function..2 19-May-04 % By Thomas P.Evaluate a Dirichlet distribution.Maximum-likelihood Dirichlet distribution. http://research.Efficient maximum-likelihood estimation % Fastfit Toolbox.Maximum-likelihood Dirichlet distribution. % polya_fit_ms . a. % polya_logprob ..mathfinance.microsoft. Test scripts for above routines.a.mle Please read update at http:://www. % Version 1.Maximum-likelihood Dirichlet mean. % dirichlet_fit . % polya_fit_s . % polya_fit .. % % test_dirichlet_fit. % dirichlet_logprob . Dirichlet-multinomial % polya_sample . Minka % % Dirichlet % dirichlet_sample .Sample from Dirichlet distribution.cn 285 . % negbin_fit . % polya_fit_simple . % dirichlet_fit_newton .k.Evaluate a Dirichlet-multinomial (Polya) distribution. % polya_fit_m .Maximum-likelihood Dirichlet precision.Maximum-likelihood Negative Binomial.Maximum-likelihood Polya precision. % inv_digamma .com/en-us/um/people/minka/software/ fastfit/ Tags .Maximum-likelihood Dirichlet distribution. % dirichlet_fit_simple .Maximum-likelihood Polya mean.Maximum-likelihood Gamma distribution. % % Polya.Maximum-likelihood Polya distribution.Maximum-likelihood Polya distribution. % dirichlet_fit_m .Maximum-likelihood Polya distribution. % dirichlet_fit_s . Efficient maximum-likelihood estimation using generalized % Newton iterations.

this can be done in several different ways.cn 286 . As an example. One traditional way to deal with this is to "transform the parameter space". for all positive values of sigma. Tags . it may stumble upon nonsensical values . You can also write an R function which computes out the likelihood function.and you do need to think about this.org/ajayshah/KB/R/documents/mle/mle. As always in R. One issue is that of restrictions upon parameters. For detail about methodology and sample codes see http://www.such as a sigma below 0 .mayin.mathfinance. When the search algorithm is running.html.Maximum likelihood estimation in R Maximum likelihood estimation can be implemented like Quasimaximum likelihood in Matlab.mle Please read update at http:://www. So it's safe to do an unconstrained search using log(sigma) as the free parameter. log(sigma) ranges from infinity to +infinity.

cn 287 . Please read update at http:://www.mathfinance. Blog will take several days off.Merry Christmas Merry Christmas to you all and happy 2009 new year.

net/download. Only one element type (float or double) is supported.html Tags . eigenvalues of a symmetric matrix.robertnz. Introduction and package downloading: http://www.htm http://www. SymmetricBandMatrix. library Please read update at http:://www. IdentityMatrix.cn 288 . printing and an interface with Numerical Recipes in C. RowVector. inverse. Cholesky decomposition. submatrix. transforms. SymmetricMatrix. Emphasis is on the kind of operations needed in statistical calculations such as least squares. sorting. concatenation. QR triangularisation. transpose.Newmat C++ matrix library This C++ library is intended for scientists and engineers who need to manipulate a variety of types of matrices using standard matrix operations. +=. determinant. It supports matrix types: Matrix (rectangular matrix). singular value decomposition. ColumnVector. BandMatrix. -. linear equation solve and eigenvalues. Schur product. -=. DiagonalMatrix. UpperTriangularMatrix. *=. LowerBandMatrix. UpperBandMatrix. Kronecker product.matrix . LowerTriangularMatrix. conversion between types.net/ nm_intro. The library includes the operations *. fast Fourier and trig.mathfinance. +.robertnz.

γ.html Tags . scale γ=1 and location δ=0. β=0.γ.δ. β=1 (blue).0) parameterization (top left).γ. the "standard" S(α. Note the discontinuity in the standard 1-parameterization near alpha=1.25 (red). download stable distribution software at http://www. distribution Please read update at http:://www. skewness is indicated by color: β=0 (black).Free Mathematica Software for Stable Analysis Stable densities in four different parameterizations: S(α. S(α.γ.75 (yellow). S(α.3) parameterization (bottom right). In all cases. The values of α are indicated on the plots.5 (green).cn 289 .1) parameterization (top right). β=0.β.δ.β.2) parameterization (bottom left).β.mathfinance.δ.mathestate.δ.stable .com/ tools/Financial/sw/Software. β=0.β.

CornishFisher # VaR.Beyond # VaR. # All returns are assumed to be on a monthly scale! functions including: # moment.Marginal # modifiedVaR (wrapper for VaR. Most of the formulae are taken from various EDHEC research papers.mathfinance.Extra moments measure The following functions are intended to replicate calculations for taking higher moments of hedge fund returns into account in analyzing particular investments.fourth # CoSkewness # CoKurtosis # BetaCoVariance # BetaCoV (wrapper for BetaCoVariance) # SystematicBeta (wrapper for BetaCoVariance) # BetaCoSkewness # BetaCoS (wrapper for BetaCoSkewness) # SystematicSkewness (wrapper for BetaCoSkewness) # BetaCoKurtosis # BetaCoK (wrapper for BetaCoKurtosis) # SystematicKurtosis (wrapper for BetaCoKurtosis) # VaR # VaR.third # moment. portfolio Please read update at http:://www.R Tags .com/brian/R/extra_moments.CornishFisher) http://braverock.moment .cn 290 .column # VaR.

thierry-roncalli.cn 291 . and Capitanio A.com/#gauss Tags . ST.Implementation of Skew Normal/Student t distributions SKEW is a Gauss library for computing pdf. Distributions generated by perturbation of symmetry with emphasis on a multivariate skew t distribution.distribution . 367-389. JRSS B.[2003].mathfinance. skew Please read update at http:://www. A. cdf and inverse of the cdf and simulating random numbers for the SN. Check A Gauss implementation of Skew Normal/Student distributions at http://www. 65. MSN and MST distribution functions described in Azzalini.

tangency. efficient.portfolio compute tangency portfolio 4.washington.portfolio compute minimum variance portfolio subject to target return 2.cn 292 .markowitz .portfolio compute global minimum variance portfolio 3.frontier computer Markowitz bullet http://faculty.mathfinance.edu/ezivot/econ483/portfolio. globalMin. splus Please read update at http:://www.ssc Tags .Functions for portfolio analysis Functions include: 1. efficient.

which is to facilitate the conversion of S-PLUS packages to R packages. working N hours without sleep (N>?). I have not tested the package. one way is to understand the functions and write your owns. however. this package provides some missing S-PLUS functionality in R. Tags .mathfinance.Convert Splus to R Suppose you have got used to Splus and want to switch to R software (why bother to change? R is free while Splus is not.html.splus . you can avoid doing like that if you are as headche as me whenever you think of this solution.cn 293 . fair enough?).r-project. though. r Please read update at http:://www.org/web/packages/splus2R/ index. what can you do? since there are many functions in S-PLUS that are missing in R. Here is downloading link: http://cran. will update later. There is a package named Splus2R.

mathfinance.cn 294 . Traditionally. and then to extract expected future timepaths.html#MatLabScripts Tags . interest rates and forward exchange rates have been applied to extract expected returns of future interest rates.distribution Please read update at http:://www.datacomm. Matlab files: http://home.ch/paulsoderlind/Software/ Software. these ways have been polished to rely on implied forward interest rates. exchange rates and inflation.Extract Market Expectations from Financial Instruments A Choosy review of recently techniques to extract information about market expectations from asset values for monetary policy uses. More lately. Very recently. methods have been studied to extract not only the mean returns but the whole (risk neutral) probability distribution from a set of option prices.

cn 295 . risk manager might want to define different degree of freedom for different markets due to their special risk profile.unipv. on the other hand. however. where seperated degree of freedom can be set for each subgroup.mathfinance. tail dependence under Gaussian copula is asymptotically equal to zero. two popula implicit copulas are Gaussian copula and T copula. sample code is here: http://economia. for instance.Grouped T copula simulation and estimation Copula is widely applied to model the dependence of multivariate variable.it/ pagp/pagine_personali/dean/programs/gruped_t_copula_simul_est Tags .copula Please read update at http:://www. has a global degree of freedom to decide largely the dependence structure. T copula. which is over-simple. which is unrealistic and under-estimate the co-movement of variables. especially in extreme market situation nowdays. Grouped-T copula was created to overcome this problem.

mathfinance.cn 296 . handled by portopt and portalloc of the Financial Toolbox .com/matlabcentral/fileexchange/16884 Tags . http://www.note that in absence of constraints other than sum(w) = 1. We consider the unconstrained mean-variance portfolio optimization problem.optimization . the problem admits a simple closed-form analytic solution .mathworks.and see whether ga and patternsearch succeed at locating the optimal portfolio identified by portalloc. markowitz Please read update at http:://www.Mean-variance portfolio optimization Quotation We seek to try out ga and patternsearch functions of the Genetic Algorithm and Direct Search Toolbox.

Tags .cn 297 . the author provide a detailed description of the properties of an APD random variable. It contains the asymmetric Gaussian and Laplace densities as special cases.mathfinance.distribution . In the paper entitled "Asymmetric Power Distribution: Theory and Applications to Risk Measurement".ucsd. such as its quantiles and expected shortfalls.htm to download "Asymmetric Power Distribution: Theory and Applications to Risk Measurement" and Matlab code files.Asymmetric Power Distribution Asymmetric Power Distribution (APD) family of densities extends the Generalized Power Distribution to cases where the data exhibits asymmetry.edu/~ikomunje/code. asymmetric Please read update at http:://www. http://econ.

000 observations). Check http://www. Tags . it has been difficult to apply spatial statistics to large datasets (e.g.000. the software can estimate simultaneous spatial autoregressions (SAR).com/ for downloading. The spatial software uses sparse matrix methods to compute the matrix determinants employed in the maximum likelihood estimation of the spatial autoregressions. Specifically. Version 1.spatial-statistics.g. statistics Please read update at http:://www.000 observations).cn 298 .matlab . and closed form maximum likelihood estimation of closest neighbor dependence. exact log-determinant computations.. more than 10.Spatial Statistics Toolbox for Matlab Historically. mixed regressive spatially autoregressive (MRSA) estimates as well as other lattice models which are the mainstay of spatial econometrics.0) capable of estimating very large spatial autoregressions (e.1 contained routines for specifying dependence via nearest neighbors or contiguity. This site contains public domain spatial software written in Matlab (Matlab Spatial Statistics Toolbox 2. one example involves 1.mathfinance.. conditional spatial autoregressions (CAR).

For codes and research results of stable http://dimacs. distribution distribution click Please read update at http:://www.rutgers.html Tags . forex.mathfinance.Generate random numbers of stable distribution A deluging section of the research in financial markets is established on the presumption that financial markets are forced by a gaussian process. and commodities markets. Stable distributions have been advised as a better model instead. This presumption has been largely debated. Nevertheless.cn 299 . The lack of analytical formulas for the probability density and cumulative distribution functions is also a reason. and it has often been demonstrated than it's untrue for equity. stable distributions are not applied much in the industry due to a lack of proper interpreting and usable software package.stable .edu/~graham/code.

http://leippold..g. just replace the last step in the binomial tree with the closed-form BlackScholes formula. for American options.A Simple Trick to Avoid Oscillation in Binomial Trees Derivative price can be calculated either by analytic formula like Black Scholes model.mathfinance. for instance. E. solving paritial difference equation. Monte carlo simulation.cn 300 . binomial Please read update at http:://www.com/matlab for details. Tags . Here's the trick. Oscillation might become dangerous when calculating Greeks via numerical differentiation. A lot of people are not aware of this simple trick to avoid oscillation in binomial trees. binomial tree. etc.tree .googlepages. or by numerical solution.

Kernel density estimation One of widely applied non-parametric density estimation methods.mathworks. The kernel is assumed to be Gaussian. Fast and accurate state-of-the-art bivariate kernel density estimator with diagonal bandwidth matrix.cn 301 . density Please read update at http:://www. this one is immune to accuracy failures in the estimation of multimodal densities with widely separated modes. The two bandwidth parameters are chosen optimally without ever using/ assuming a parametric model for the data or any "rules of thumb".com/matlabcentral/fileexchange/17204 Tags .mathfinance.kernel . Unlike many other procedures. http://www.

or Monte Carlo) The program is a downloadable executable for MS Windows systems: http://www. Series.OptionCity Calculator Key Benefits of the OptionCity Calculator * Flexible models with stochastic volatility and stock price jumps * Option prices with Greeks (sensitivity to parameters) * Realistic Smile charts * Fast evaluations * Self-validating results.mathfinance.net/calculator.optioncity.calculator .htm Tags . (You validate calculations by selecting a different numerical method: Lattice. option Please read update at http:://www.cn 302 .

hec.html Tags .cn 303 .ch/matlabcodes/option_pricing.Simulation of Heston model Generates Heston stochastic volatility process at various frequencies. % ds = mu dt Vt^1/2 dW_1t % dVt = b(a-Vt) dt sig Vt^1/2 dW_2t % Corr( dW_1t.heston Please read update at http:://www.unil. dW_2t )=rho % S0 is starting value of price proces % NbD corresponds to numbers of days http://www.mathfinance.

for instance.scs. Peter J Acklam inverse normal cumulative distribution or Beasley-Springer-Moro inverse normal.html.simulation .Uniform Random Number Generator Uniform Random number is crucial for Monte Carlo simulation.cn 304 . old.edu/~burkardt/math_src/uniform/uniform. monte carlo Please read update at http:://www. Tags . and limited linear congruential random number generator originally used in the IBM System 360. Normal random number can be simulated then by inverse normal cumulative function. UNIFORM is a Mathematica library which return a sequence of uniformly distributed pseudorandom numbers. For detail and several language version pls click http://people. some famous uniform random number generators are Halton sequence and Sobol sequence.mathfinance. The fundamental underlying random number generator in UNIFORM is based on a simple.fsu.

Lyapunov exponents are calculated from the derivative matrices of estimated network models (Gencay and Dechert (1992)). forthcoming. NETLE.neural-network Please read update at http:://www. Note that a positive Lyapunov exponent indicates that the underlying series is chaotic. Neural networks are estimated by the method of nonlinear least squares (NLS) (Kuan and Liu (1995)). Dechert (1992).html Tags . http://www. estimates feedforward neural network models and computes Lyapunov exponents (LE). "An algorithm for the n Lyapunov exponents of an n-dimensional unknown dynamical system".cn 305 .ca/~rgencay/lyap. Physica D. Chung-Ming and Tung Liu (1995).mathfinance. "Forecasting exchange rates using feedforward and recurrent networks". Journal of Applied Econometrics. Gencay. D.EXE. 59.Feedforward Neural Networks and Lyapunov Exponents Estimation This program. Ramazan and W.sfu. REFERENCES: Kuan. 142-157.

27.mathfinance. * diagnostic checking of fitted AR models.gps. ACM Trans. Paper and Package are at http://www. Neumaier. Math. ACM Trans.Estimation of parameters and eigenmodes of multivariate autoregressive models ARfit is a collection of Matlab modules for * estimating parameters of multivariate autoregressive (AR) models. Softw. Tags . 58–65.cn 306 . Schneider and A. and * analyzing eigenmodes of fitted AR models...autoregressive Please read update at http:://www.caltech. the package is based on the following two paper: A.A Matlab package for the estimation of parameters and eigenmodes of multivariate autoregressive models. Softw. 27.edu/~tapio/arfit/ #files. 2001: Estimation of parameters and eigenmodes of multivariate autoregressive models. 2001: Algorithm 808: ARfit . Math. Schneider. T. 27–57. Neumaier and T.

Cox.cn 307 .waikato.Interest Rate Modeling in Excel Interest Rate Modeling including: Nelson Siegel Yield Curve Model Nelson Siegel Yield Curve Model with Svensson 1994 Extension One-Factor Interest Rate Models (Vasicek.nz/kurt/frontpage/modelmainpages/ InterestRateModels.ac.Hull & White Method http://www.yield Please read update at http:://www. Ingersoll & Ross) Interest Rate Trinomial Tree .mngt.htm Tags .mathfinance.

Gumbel. Independence tests among random variables and random vectors. Serial independence tests for univariate and multivariate continuous time series. random number generation. distribution. extreme value (Husler-Reiss and Galambos).copula Please read update at http:://www. Goodnessof-fit tests for copulas based on multipliers and on the parametric bootstrap. Functions for fitting copula models.org/web/ packages/copula/index. Methods for density. bivariate dependence measures. and other families (Plackett and Farlie-Gumbel-Morgenstern).cn 308 . perspective and contour plots.html Tags . and Ali-Mikhail-Haq).Multivariate dependence with copulas Classes (S4) of commonly used copulas including elliptical (normal and t). R package can be downloaded at http://cran. Frank. Archimedean (Clayton.r-project.mathfinance.

ca/~rgencay/ evim. It turns out that we can answer these questions within the framework of the extreme value theory.mathfinance.html.sfu. paper and code can be downloaded at http://www. This paper provides a step-bystep guideline for extreme value analysis in the MATLAB environment with several examples.cn 309 . Tags . one of the most interesting questions that tail studies can answer is what are the extreme movements that can be expected in financial markets? Have we already seen the largest ones or are we going to experience even larger movements? Are there theoretical processes that can model the type of fat tails which come out of our empirical analysis? Answers to such questions are essential for sound risk management of financial exposures.Extreme Value Analysis in Matlab EVIM: A Software Package for Extreme Value Analysis in MATLAB Quotation From the practitioners’ point of view.extreme Please read update at http:://www.

com/matlab Tags . Sobol sequences is among the most widely-used low-discrepancy sequences. The biggest challenge for generating sobol sequences is to construct primitive polynomials. simulation Please read update at http:://www. here is a Mathematic file showing the algorithm to construct primitive polynomials for multi-dimensional Sobol sequences .Primitive polynomials for Sobol sequences Quasi monte carlo method is popular for derivative pricing. http://leippold.cn 310 .sobol .mathfinance. and most efficient one I have ever used. have fun.googlepages.

Generalized Method of Moments.mathfinance. Modeling Extreme Values. Copulas. I found the S-plus scripts accompanying the book Modeling Financial Time Series with S-PLUS. as my colleagues said.htm Tags . VAR Models. Term Structure. it is hard to understand it is still existed in 21 centuary). Cointegration. Time Series Regression. Long Memory. Systems of Regression Eqations. covering: Time Series Manipulation.cn 311 .washington. For detail please download at http://faculty. etc.Modeling Financial Time Series with S-PLUS Although S-plus is the most terrible language I have ever used in terms of debugging (I have to say that. Unit Root Tests. Time Series Concepts. no offense to S-plus fans. Factor Models.s-plus Please read update at http:://www.edu/ezivot/ MFTS2ndEditionScripts. Univariate GARCH. Rolling Analysis.

where the authors used Cubic-spline. B-spline and MLES spline curve to model interest rate curve. including a penalty in the generalized least-squares objective function. and Fourier Series: More Yield Curve Modelling at the Bank of Canada.html Tags . Polynomials.cn 312 .Yield Curve Modelling Exponentials.bankofcanada. Interested ppl can refer to the PDF document and Matlab codes are at appendix.matlab . http://www.mathfinance. yield Please read update at http:://www.ca/en/res/wp/2002/ wp02-29.

theta Option Applications & Exotic Options: Corporate securities. American Numerical Greeks (& Some Latin): delta. cash flow.. passthrough. CMO.ntu.Online derivative calculator An online derivative calculator covers: Bond Price Volatility: duration(s). ARM. etc.mathfinance. CMO. CPR. futures. derivative Please read update at http:://www. option-adjusted spread. forward. Faure-sequences GARCH option pricing model:multinomial tree. seq.. prepayment model. SMM. PSA. duration convertible bond. Parisian option. Term Structure: yield curve. term structure theories Option Pricing: Black-Scholes. HJM Mortgage-backed Securities: prepayment. stripped MBS. BDT. Sobel-. barrier. lookback. spot rate. Brownian bridge.edu.calculator .compound. vega. http://www. binomial. swap Monte Carlo & Quasi-random: variance reduction. option-adjusted spread . Hull-White. CIR. exchange. gamma. Asian.csie. PO/ IO. Vasicek. Monte Carlo Interest Rate Models: lognormal. PAC. futures option. forward rate. Halton-.htm Tags . European. convexity.tw/~lyuu/Capitals/capitals. immunization.cn 313 . callable & put bond.

dozens of underlying distributions are ready for choice when using Monte Carlo simulation and Parametric method. A sample Matlab code to construct the Generalized Student t over a given support then compute quantiles and numerical expected shortfall is http://www.ch/matlabcodes/Econometrics/TestGTdens.unil. worse) than VaR over a target horizon within a given confidence level.var . Monte Carlo simulation. t Please read update at http:://www. among which Gaussian distribution is. Expected Shortfall (ES).mathfinance. undoubtedly the most popular one. t-distribution is also widely used due to its ability to capture fat-tail. es . including Historical simulation.m. Tags . is the expectation of the losses bigger (that is.cn 314 . also called Conditional tail expectation (CTE).VaR and Expected shortfall under Generalized Student t Value at risk (VaR) is the expected maximum loss an asset or a portfolio can incur over a target horizon within a given confidence level.hec. and parametric method. There are several methods in calculating VaR.

R-language version can be downloaded at http://cran.mathfinance. Tags . which is accompanying the book Quantitative Risk Management: Concepts.ac.hw.ma.r-project. Rudiger Frey and Paul Embrechts. a nice book written by one of my professors. credit risk analysis. Techniques and Tools by Alexander J.html.cn 315 .Quantitative Risk Management R package I shared an Econometric tools for performance and risk analysis package in R.uk/~mcneil/book/index. Given the fact it was ranked by one of the top 10 most technical books of the year 2007.risk Please read update at http:://www. McNeil.org/ web/packages/QRMlib/index.html and S-PLUS library to accompany book is at http://www. In this book special care is given to Copula analysis. etc. Extreme value thoey. today I introduce another Quantitative Risk Management R package. i bet you will learn a lot from it.

including those with implicit models and multiresponse data.mathfinance. ODRPACK . over a space of parameters of the function. The algorithms in ODRPACK solve unconstrained nonlinear least squares problems and orthogonal distance regression problems. and PROC NLP also contain LevenbergMarquardt routines. The Levenberg-Marquardt algorithm has proved to be an effective and popular way to solve nonlinear least squares problems. These minimization problems arise especially in least squares curve fitting and nonlinear programming. optimization Please read update at http:://www.forth.Levenberg-Marquardt nonlinear least squares algorithms In mathematics and computing.levenberg-marquardt . MATLAB .cn 316 .gr/ ~lourakis/levmar/ Tags .ics. For detail about Levenberg-Marquardt nonlinear least squares algorithms introduction and code pls click http://www. generally nonlinear. the Levenberg–Marquardt algorithm (or LMA) provides a numerical solution to the problem of minimizing a function. MINPACK-1 contains Levenberg-Marquardt codes in which the Jacobian matrix may be either supplied by the user or calculated by using finite differences. IMSL .

Newey and West Covariance Matrix Estimator Covariance matrix is vital for pricing and risk analysis.hku. before I shares a Matlab code on weighted covariance matrix computation. which calculates the covariance matrix with a non-parametrical method. For detail please refer to http://kafuwong. here is another method named Newey & West covariance matrix.htm. Truncated and Quadratic Spectral.mathfinance. Tags .covariance Please read update at http:://www. An example program also demonstrates how to use of these procedures.cn 317 . Choices of kernels include Bartlett.econ.hk/research/gausscode/cov1.

* The least squares regression method * maximum likelihood method methdology applied and sample matlab code http://www.yield . two popular types are Vasicek and CIR.com/doc/Calibrating_the_OrnsteinUhlenbeck_model.sitmo.mathfinance. Tags .Calibrating the Ornstein-Uhlenbeck model Ornstein-Uhlenbeck model is widely used to model interest rate. calibration are at Please read update at http:://www.cn 318 . here the author describes two methods for calibrating the model parameters of an Ornstein-Uhlenbeck process to a given dataset.

jp/~kanzler/ index.cn 319 .Econometrics Software Dozens of Matlab code for Econometrics study.%20Kanzler:%20Software Tags .econometrics Please read update at http:://www.mathfinance.htm#L. Dechert& Scheinkman (1986) test for independence based on the correlation dimension Significance level of the BDS statistic in small samples Geweke &Porter-Hudak (1983) estimation of fractional differencing parameter Heteroskedasticity-consistent variance-ratio evaluationfor any q spacing Engle's(1982) test for ARCH Box-Pierce(1970) Q test using Ljung & Box's (1978) finite-sample correction Phillips-Perron test of the unit-root hypothesis in a Dickey-Fuller regression Durbin h statistic and significance of the hypothesis of no serial correlation Durbin-Watson d-statistic and significance level for the null hypothesis: DW = 2 http://ww61.ne. including: Brock.tiki.

The mixing process had been studied. and some information on the derivation. Neither of these methods has an intuitive connection back to the market. It provides the rationale for the methodology. nothing similar had been published. took a shrinkage approach to improve the final asset allocation. Copies of the FAJ article are widely available on the Internet. the CAPM equilibrium market portfolio.cn 320 . as a starting point for estimation of asset returns.Black Litterman Portfolio Allocation Quotation The Black Litterman model was first published by Fischer Black and Robert Litterman of Goldman Sachs in an internal Goldman Sachs Fixed Income document in 1990. This paper was then published in the Journal of Fixed Income in 1991. but nobody had applied it to the problem of estimating returns. The latter article was then republished by FAJ in the mid 1990's. No research linked the process of specifying views to the blending of the prior and the investors views. Second. the BlackLitterman model provides a clear way to specify investors views and to blend the investors views with prior information. It also includes a rather complex worked example. Prior to their paper. Previous similar work started either with the uninformative uniform prior distribution or with the global minimum variance portfolio.mathfinance. it provides an intuitive prior. The Black Litterman model makes two significant contributions to the problem of asset allocation. described by Frost and Savarino (1986) and Jorion (1986). A longer and richer paper was published in 1992 in the Financial Analysts Journal (FAJ). The investor's views are allowed to be partial or complete. and the views can span arbitrary and overlapping sets of assets. but does not show all the formulas or a full derivation. and a clear way to combine those Please read update at http:://www. The latter method. First. which is difficult to reproduce due to the number of assets and use of currency hedging. The model estimates expected excessreturns and covariances which can be used as input to an optimizer. The BlackLitterman model provides a quantitative framework for specifying the investor's views. The idea that one could use 'reverse optimization' to generate a stable distribution of returns from the CAPM market portfolio as a starting point is a significant improvement to the process of return estimation..

blacklitterman.allocation .mathfinance.org/blapplet.cn 321 .html Tags .investor's views with an intuitive prior to arrive at a new combined distribution. For a collection of reference paper and an online application please see http://www. black-litterman Please read update at http:://www.

XLS: Valuation of Caps and Floors. putable bonds CAP. yield Please read update at http:://www.XLS: Numerical valuation of zero coupon bond options SWAP.com/ny/ financeinfo/research.hull-white . including: HEDGE.XLS: Calculation of hedge parameters CALIBRAT. calculation of optimal volatility parameters AMERICAN.Hull-White Term Structure Model Accompanying Excel of "Implementation of Hull White's No-Arbitrage Term Structure Model" by Eugen Puschkarski.XLS: Valuation of binary options of an accrual swap CONVERG2.XLS: Valuation of standard and non-standard floater NUM.mathfinance.angelfire.cn 322 . comparison of analytical and numerical solution COUPON.XLS: Valuation of callable.XLS: Valuation of American style option CALLABLE.XLS: Calculation of swaptions Paper and Excel file can be found at http://www.XLS: Pricing of an option on a coupon bond BINARY.html wiki(Hull-White model) Tags .XLS: Analysis of convergence behaviour of the numerical solution CONVERG3.XLS: Calibration of the model to market data.XLS: Analysis of convergence behaviour if cash flows between nodes do occur FLOATER1.

Barrier.toronto. Related Matlab codes can also be downloaded http://www. Shout and Spread option. Merton Jump Diffusion. option at Please read update at http:://www. American.edu/~vsurkov/fst_matlab.calculator .73.100. derivative .cn 323 . Papers: * Option Pricing with Regime Switching Levy Processes Using Fourier Space Time-stepping * Fourier Space Time-stepping for Option Pricing with Levy Models.Fourier Space Time-stepping (FST) option calculator Online Fourier Space Time-stepping (FST) option calculator where options class includes European.155/fst/. Variance Gamma. stock price models and options refer to the papers below at the site http://128.cs. underlying stock process follows Black Scholes Merton. Normal Inverse Gaussian and CGMY.html Tags . Kou Jump Diffusion.mathfinance. For more information on the Fourier Space Time-stepping (FST) method.

However. sometimes we need to change correlation matrix to our forecasting values.m and http://www. especially when Monte Carlo simulation is applied.maths. In practice. http://www.pdf details the way to overcome it. otherwise the volatility calculated might be negative. eigenvalues must be positive. Tags .manchester. in other words.manchester.mathfinance.ac. to simulate correlated random numbers via Cholesky decomposition of correlation matrix.correlation . for instance. which is non-acceptable. one strong requirement of Cholseky decomposition on correlation matrix is positive semidefinite.ac.maths.ac.uk/~nareports/ narep369.Nearest correlation matrix Correlation matrix exists almost everywhere for derivative pricing and risk management.uk/~clucas/ eig_mex.manchester.c. even minor change might lead to invalid matrix. Another example of positive semi-definite correlation matrix requirement is for risk management measurement.uk/~clucas/ near_cor. accompanying Matlab code can also be found at http://www.cn 324 . for this problem.maths. cholesky Please read update at http:://www.

This code implements that connection. with a fairly rich framework for handling data conversion. Matlab is a wonderful commercial product for scientific and technical computing. Using them together is a great tool for quantitative data analysis.mathfinance.MySQL and Matlab The MySQL database server is very popular for its openness.nyu.edu/~almgren/mysql/ Tags . and speed. http://cims. You can do this using the Matlab Database Toolbox. but it is more efficient to connect directly using the APIs for both products.cn 325 . especially dates and times. robustness.matlab . sql Please read update at http:://www.

Basics of Option Valuation Open Source Software for Financial Engineering and Computational Finance Rmetrics is the premier open source solution for teaching financial market analysis and valuation of financial instruments.cn 326 .cnr. With hundreds of functions build on modern methods Rmetrics combines explorative data analysis.r .berkeley.Rmetrics . The Rmetrics Packages are embedded in R building an environment which creates for students a first class system for applications in statistics and finance.mathfinance.edu/web/packages/fOptions/ index.html Tags . option Please read update at http:://www. statistical modeling and rapid model prototyping. Download at http://cran.

financial-risk-manager. least squares fitting of data. Excel.com/risks/ analytics/multivar/an_mv_t. Singular Value Decomposition to solve ill conditioned square matrices. range and null space of a matrix. and determining the rank.svd . with several applications in signal processing and statistics. Applications which employ the SVD include computing the pseudoinverse.Singular Value Decomposition In linear algebra. the singular value decomposition (SVD) is an important factorization of a rectangular real or complex matrix. C++ Add-in and Demo Spreadsheet with application manual and on-line help are at http://www.html#svd wiki(Singular value decomposition) Tags . matrix approximation. matrix Please read update at http:://www.mathfinance.cn 327 .

mathfinance.Heston model pricing and calibration Quotation The Heston Model is one of the most widely used stochastic volatility (SV) models today. evolved into something that could fill this gap. I. Enroute I realised that fundamental information that one would require to gain an intuitive understanding of such a model was very disjoint and hence incomplete.zip Tags .wits.ac. All the relevant tools are provided to facilitate this calibration process. including MATLAB code.za/NR/ rdonlyres/98E22C37-FA41-4C5B-8F11-F44BED5FF4C7/0/ nimalinmoodley. Attempting to solve such a problem was an impossible task due to the lack of exposure to such ‘advanced’ models. therefore. paper and code can be downloaded at http://web. therefore. This project. decided to take a slight digression into the world of Heston and stochastic volatility.heston Please read update at http:://www. A practical approach has been adopted since the focus of calibration is quite practical itself.cn 328 . This code has been confined to the appendix to keep the main body clutter free and ‘quickto-read’. Its attractiveness lies in the powerful duality of its tractability and robustness relative to other SV models. This project initially begun as one that addressed the calibration problem of this model.

Black Litterman allocation .shrinkage estimators: Stein and Ledoit-Wolf..more uni-.stochastic dominance .robust estimators: Hubert M.Bayesian estimation (multivariate analytical.robust Bayesian allocation .and matrix-variate distributions .mathfinance. compounded vs. linear returns.robust optimization (calls SeDuMi to perform cone programming) .more.Cornish-Fisher approximation for VaR .mean-variance analysis and pitfalls (different horizons.MATLABroutines for risk and portfolio management These routines support the book "Risk and Asset Allocation" Springer Finance. Bayesian classical equivalent .cn 329 .symmys.FFT-based projection of a distribution to the investment horizon . multi..step-by-step evaluation of a generic estimator ..more graphical representations . by A.extreme value theory for VaR .best replication / best factor selection .caveats about delta/gamma pricing . The routines include many new features: .) . uneven-series conditional estimation . Monte Carlo Markov Chains. . sample chapter and codes can be downloaded http://www.com/AttilioMeucci/Book/Downloads/ at Please read update at http:://www.missing-data techniques: EM algorithm.kernel-based contribution to VaR and expected shortfall from different risk-factors . high-breakdown minimum volume ellipsoid . Meucci.more analyses in terms of the location-dispersion ellipsoid.non-parametric estimators .multivariate elliptical maximum-likelihood estimators . priors for correlation matrices) .estimation risk evaluation: opportunity cost of estimation-based allocations .. etc.more copulas .

Downloads Tags .allocation Please read update at http:://www.cn 330 .mathfinance.

specifically for R language programming users. Enjoy.finmath.rseek. one is search Quant code. the other one is R-project search engine.mathfinance. http://www.cn 331 .org/ Please read update at http:://www.Code search portal Share two code search portal today.cn/ http://www. where people can search code relative to quantitative finance. Code Search example: Black Scholes matlab. for instance.

google.Bayesian Copula Selection Matlab implementation of a method to select the 'best' copula among a subset of copula families. Based on theory published in : Huard. vol. A. Bayesian Copula Selection.-C. D.com/p/copula/ Tags . Évin. http://code. COMSTA3137. 809-822. Computational Statistics and Data Analysis.copula Please read update at http:://www. Favre (2006).cn 332 . 51 (2). G..mathfinance.

Cuhre employs a cubature rule for subregion estimation in a globally adaptive subdivision scheme. and is usually the only viable method to obtain high precision. Divonne is a further development of the CERNLIB routine D151. By dividing into subregions. not a Monte Carlo method. the most significant being the possibility to supply knowledge about the integrand. Monte Carlo simulation. Suave. but is only in some cases competitive in terms of the number of samples needed to reach a prescribed accuracy. Suave is a new algorithm which combines the advantages of two popular methods: importance sampling as done by Vegas and subregion sampling in a manner similar to Miser. Divonne works by stratified sampling. Suave manages to a certain extent to get around Vegas' difficulty to adapt its weight function to structures not aligned with the coordinate axes. here I share a Cuba library which offers a choice of four independent routines for multidimensional numerical integration: Vegas. and Cuhre. In each iteration. especially in high dimensions. by Simpson. it has a few improvements over the original algorithm and comes in handy for cross-checking the results of other methods. It is hence a deterministic. It uses importance sampling for variance reduction. Quotation Vegas is the simplest of the four. multidimensional integration is time-consuming and prone to error. the subregion with the largest error is halved along the axis where the integrand has the largest fourth difference. Please read update at http:://www. say relative accuracies much below 1e-3. Often the exact or approximate location of such peaks is known from analytic considerations. Nevertheless.Multidimensional numerical integration Most derivative pricing problems have finally come to solve integration numerically. A number of improvements have been added to this algorithm..cn 333 . Divonne. however. and with such hints the desired accuracy can be reached with far fewer points.mathfinance. Narrow peaks in particular are difficult to find without sampling very many points. etc. however. Cuhre is quite powerful in moderate dimensions. where the partitioning of the integration region is aided by methods from numerical optimization.

mathfinance.cn 334 .feynarts.de/cuba/ Tags .integration Please read update at http:://www.http://www.

cn 335 . http://braverock. We created this library to include functionality that has been appearing in the academic literature on performance analysis and risk over the past several years. Summary Tables of related statistics. In doing so. and some thoughts on work yet to be done. a variety of Wrappers and Utility functions. The following sections cover Performance Analysis. Risk Analysis (with a separate treatment of VaR).econometrics . but had no functional equivalent in R. r Please read update at http:://www. so that we could access that functionality using a function with defaults and naming consistent with common usage in the finance literature.Econometric tools for performance and risk analysis Quotation Library of econometric functions for performance and risk analysis of financial portfolios. Charts and Graphs. performance .html Tags .com/brian/R/PerformanceAnalytics/html/ PerformanceAnalytics-package. This library aims to aid practitioners and researchers in using the latest research in analysis of both normal and non-normal return streams.mathfinance. we also found it valuable to have wrapper functions for functionality easily replicated in R.

schonbucher.de/risk/index.the generating matrix A of the ratings process .Decomposing rating transition matrices Spreadsheet for the calculation of: .the diagonal decomposition MDM^-1 .de/risk/rating_case.schonbucher.cn 336 .the time-dependent transition matrix P(t) http://www.xls Tags .html spreadsheet http://www.rating Please read update at http:://www.mathfinance.

r-cookbook. and make the learning process more efficient for new users. solutions.com is a collection of "recipes"--problems.Collection of R codes R-Cookbook.com/ Please read update at http:://www. http://www. promote the use of R. and working examples--contributed by the R community in order to share code.mathfinance.cn 337 .

) and the problem with the missing values is gone..unibas.) instead of LINEST(. http://www. The data have to be organized column-wise.cn 338 . the function fails if some values are missing in the data. After installing this add-in. and then calls Excel's LINEST to perform the estimation with the cleaned data.. you can simply say LINESTNA(.OLS Regression with missing values Excel provides a handy function called LINEST that allows the user to make OLS regressions in an very quick and simple fashion.ch/ds/abt/wirtschaftstheorie/personen/ yvan/software/#c6714 Tags .mathfinance..wwz. The program first extracts the rows that do not contain any missing values. Unfortunately.regression Please read update at http:://www.. Here is a small program that addresss this shortcoming.

html and matlab file http://www.Crank-Nicholson finite difference solution of American option Crank-Nicolson for a European put was introduced before. Tags . T is the time to maturity of the option in years.cs. option Please read update at http:://www. and Q is the dividend rate of the asset. Note that this function returns an approximate solution unlike the analytical solution (BLSPRICE) SO is the current asset price. i share another sample code using CrankNicholson finite difference for American option. and M denotes the number of discretization points in time domain used for the PDE solution.american . X is the exercise price. pde .Try increasing either of M or N to achieve greater efficiency. to better master this technique. The default Q is 0.cornell.mathfinance.cornell.edu/Info/ Courses/Spring-98/CS522/home. R is the risk-free interest rate.cs. SIG is the standard deviation of the annualized continuously compounded rate of return of the asset (also known as volatility).m.cn 339 . N denotes the number of discretization points in the stock price domain. lecture notes can be downloaded at http://www. BLSPRICEFDAM Black-Scholes put and call pricing for American Options using the Crank-Nicholson finite difference solution of BlackScholes Partial differential equation.edu/Info/Courses/Spring-98/CS522/content/ blspricefdam.

new job will start from tomorrow. thx for your support. I will try to update new code link as possible as i can.cn 340 . the first few weeks will be busy as i need to get used to the new life here.Career change Arrived in London today.mathfinance. Please read update at http:://www.

read CrankNicolson for put. that is higher than the current asset price.m.strath.uk/~aas96106/ ch21.cn 341 . H.mathfinance.maths. the value of the up and out call is zero.Up-and-out call option by Monte Carlo Another sample code of the book An Introduction to Financial Option Valuation: Mathematics. Stochastics and Computation.ac.barrier . Code can be accessed here http://www. when H is less than or equal to K. Tags . An up and out call is a regular call option that ceases to exist if the asset price reaches a barrier level. option Please read update at http:://www. This sample calculates a up-and-out call barrier option via Monte Carlo simulation with antithetic variates.

cn 342 .htm Tags .yield Please read update at http:://www. The tree matches to the yield curve but not to the volatility. page 260. each one corresponding to a node on the tree.mathfinance.uk/TreeClass. The programming code is grounded on the book "Implementing Derivatives Models".Trinomial tree class for short rate model This page comprises the code and items of a C++ class that could be applied to construct a trinomial tree for the short rate.co. curve. Clewlow and Strickland.phineas. curve. http://www. Currently the tree is matched to the underlying interest rate curve. By input a set of parameters the class will form an array of nodes. the code specifies a C++ implementation of a tree object.pwp.blueyonder. but not a vol.

A log difference is log(S’) – log(S) or log(S’/S).com/new/docs/gs-volatility_swaps.ederman. The strategy is discussed in Gatheral p. Tags .m and the above mentioned paper.1. The strategy works by exploiting the difference between percentage differences and log differences.mathfinance. A percentage difference is expressed as (S’ – S)/S or S’/S . Fore more detail refer to http://math.cn 343 .heston Please read update at http:://www.edu/~atm262/files/fall06/ casestudies/a7/hestonvarswap.pdf.Variance swap hedging under Heston volatility Calculate variance swap hedging portfolio under Heston vol model using MC simulation.nyu.136 and http://www.

which can be further used to price option on bonds. Download at http://www.mathfinance.htm. for instance. besides Vasicek short rate model. Here i share another two excel files demonstrating how to calibrate a Vasicek model to a given term structure and simulate Vasicek zero bond prices and the path of the short rate.uni-kl. how to implement Vasicek interest rate model in binomial tree. CIR.vasicek Please read update at http:://www.mathematik.Vasicek Model calibration and simulation Entries Vasicek estimation and Vasicek model in binomial tree introduced how to estimate Vasicek model parameters. Dothan and Exponential Vasicek are also included in one file. Tags .de/~korn/korn2b.cn 344 .

Crank-Nicolson method is an average of the explicit method and implicit method.mathfinance.html wiki(Finite difference method) Tags . http://frontera. for example. Other types are just the derivation of these two types. Two sample Matlab files to compare the performance of solving PDE via implicit and explicit method.cn 345 .pde Please read update at http:://www.Solving PDE implicit / explicit methods Basically there are two types of finite difference methods: explicit finite difference method and implicit finite difference method.bu.edu/MathFn.

15. option Please read update at http:://www. Vol.edu/~vecer/. Since no general analytical solution for the price of the Asian option is known. a variety of techniques have been developed to analyze arithmetic average Asian options. The paper "Unified Asian Pricing". Risk. A simple and numerically stable 2-term partial differential equation characterizing the price of any type of arithmetically averaged Asian option is given. The approach includes both continuously and discretely sampled options and it is easily extended to handle continuous or discrete dividend yields.stat. 6.columbia.Unified Asian Option Pricing Asian options are securities with payoff which depends on the average of the underlying stock price over certain time interval.cn 346 . Tags . 113-116 and its Mathematica nb file can be downloaded at http://www.asian .mathfinance. No.

charting. since the objective of the algorithm is to locate similar pieces of information. For the NN. which is similar to the fractal dynamic of a chaotic time series. The ARIMA modeling philosophy is to capture a statistical pattern between the locations of the observations in time.do?objectId=9396&objectType=file Tags . Such way of capturing the pattern on the times series behavior is the main argument for the similarity between NN algorithm and the graphical part of technical analysis. and such fact can be used for forecasting purposes. The way the NN works is very different than the popular ARIMA model.mathfinance.forecast Please read update at http:://www. the main idea of the NN approach is to capture a nonlinear dynamic of selfsimilarity on the series.Nearest Neighbour Algorithm to forecast Stock Prices This is the algorithm involved on the use of the non-linear forecast of asset's prices based on the nearest neighbour method.m) and the other is the multivariate approach. Its main idea is that the series copies its own behavior along the time. On the zip file there are two functions: one is the univariate version of NN (nn.mathworks. such location is not important. The basic idea of the NN algorithm is that the time series copies it's own past behavior.cn 347 . In other words. http://www.m). Quotation The nearest neighbor method is defined as a non-parametric class of regression. Behind all the mathematical formality. independently of their location in time. also called simultaneous NN (snn. past pieces of information on the series have symmetry with the last information available before the observation on t+1.com/matlabcentral/fileexchange/ loadFile.

do not find justification in the markets. Here is an sample Matlab file for FFT computation of option prices. On the other hand. This effect is even boosted by the possibility of the pricing algorithm to calculate prices for a whole range of strikes. which take into account the empirical facts. To overcome this problem Carr and Madan (1999) developed a fast method to compute option prices for a whole range of strikes. option Please read update at http:://www.cn 348 . while the density is often not known in closed form. e. in calibration of the implied volatility surface. often lead to more computations and this time burden can become a severe problem when computation of many option prices is required. More complex models.g. But some of its assumptions. http://www.FFT computation of option prices The Black-Scholes formula. allows for an easy and fast computation of option prices.m. On the one hand. the algorithm offers a speed advantage. like constant volatility or log-normal distribution of asset prices. the cf of the log price is known and has a simple form for many models considered in literature.theponytail.mathfinance.net/CCFEA/lect01/lect01fftoptionnormal. the use of the FFT is motivated by two reasons. one of the major breakthroughs of modern finance. wiki(Fast Fourier transform) Tags . Fast Fourier transform (FFT) is applied for this purpose.fft .

mathfinance.pietersz. MajorW implements non-constant weights. MajorW and MajorPower are MATLAB templates that may be used to find a low-rank correlation matrix locally nearest to a given correlation matrix.org/ majorization.org/major.Rank reduction of correlation matrices by majorization Rank reduction is useful for multi-factor derivative pricing and risk analysis. by means of majorization. for instance. For an introductory of Rank reduction of correlation matrices by majorization paper can be downloaded at http://www.correlation Please read update at http:://www. for a Bermudan swaption. Major.cn 349 . Major implements equal weights on the entries of the correlation matrix.pietersz. with Matlab codes http://www.htm Tags .pdf.

Allows the user to create a portfolio of options (and thus straddles. Once this is done. Type PlotMeTheGreeks() on the matlab command line to start the GUI. volatility.do?objectId=10428&objectType=FILE Tags .mathfinance. butterflies and anything else you fancy can be easily created using the GUI).cn 350 . It also allows you to perturb a 4th dimension also allowing you to create an animation. vega and variance vega in 3D and examine how they vary with time to maturity.com/matlabcentral/fileexchange/ loadFile. delta. gamma.Option greeks analysis A useful tool built to help the user gain an intuitive feel for option pricing and the greeks.mathworks. http://www. the user can plot the option price. interest rates and carry. option Please read update at http:://www. strangles.greeks .

mathfinance.real-option .fuqua. option Please read update at http:://www. for those of you interested into applying real option valuation model in real situation.cn 351 . Doc file and Excel sheet can be downloaded here http://faculty.duke. Tags .edu/~charvey/Teaching/BA456_2002/ LogiTech/.Real option case study Nth much to say.

mathfinance.no/ ~pjacklam/notes/invnorm/index. for a given uniform random numbers series. A very fast and accurate approximation is the one given by Boris Moro in [Mor95]. here comes the problem. there are several numerical implementations providing different degrees of accuracy and efficiency. Good.cn 352 . Acklam’s procedure is able to produce the inverse cumulative normal function to full machine accuracy by applying a second stage refinement using Halley’s method. enjoy.random .Peter J Acklam inverse normal cumulative distribution Random number generation is essential for Monte Carlo simulation. among random numbers. normal distributed numbers are undoubtedly the most widely used ones. for my study and work i have tried both but couldnot decide which one is better. is probably the algorithm by Peter Acklam. here is the page for Peter J Acklam inverse normal cumulative distribution codes in several languages.html#The_algorithm. however. http://home.online. for the inverse cumulative normal function z = N'(p). The most accurate whilst still highly efficient implementation currently freely available. here i quote the sentence from the book "Monte carlo methos in finance" by Peter Jackel: Equally. here is another power function named Peter J Acklam inverse normal cumulative distribution. Tags . how do you compute the inverse normal cumulative distribution function? I once introduced Moro inverse normal function for this purpose. normal Please read update at http:://www. when allowing for an additional evaluation of a machine-accurate cumulative normal distribution function.

both stochastic interest rate and stochastic volatility play a role for its valuation.ernet. hereafter called Parisian option. The convertible bond calculator uses a binomial lattice with the stock price as the only state variable to analyse convertible bonds with call and put features. besides this feature. The software does not use the warrant valuation approach which requires the volatility of equity (stocks plus warrants).php.in/ ~jrvarma/software/convertible.Numerical valuation of convertible bonds A Convertible Bond (CB) is a hybrid derivative with complex embedded features. in Asian markets.iimahd. consecutive time..zip online convertible bonds calculator http://www. etc.ernet. it allows the holder to convert the bond to a certain shares (conversion ratio) of stock issued by the same company at a prescribed stock price (conversion price).cn 353 .convertible bond Please read update at http:://www.ernet. CB normally has embedded American call (put) option which allows the bond issuer (holder) to call (sell) back the CB from holder (to issuer) at a pre-decided call (put) price once the underlying stock price is above (below) strike price for a certain prescribed. it ignores the dilution effect and uses stock price volatility which is more readily available.php. Instead. CB is under default risk.iimahd.in/~jrvarma/software/ecb. download at http://www.mathfinance.in/~jrvarma/software. CB also has a refix clause which allows the bond issuer to reset the conversion price. under several stock price scenarios. more are at http://www. Tags .iimahd. as a hybrid product with equity and fixed income characteristics.

mathfinance. Oct 1993.S2 . it can be considered as a type of rainbow option in that it's payoff depends on 2 or 3 underlying assets. Spread option is widely used in energy industry. Ravindran. where K is the strike price betting on the spread (or difference) of these two stock prices.org/FF/cpplib.mathfinance. for instance.K.spread . for detail check http://www.Spread option valuation Spread option derives its value from the difference between the prices of two or more assets. In previous entry how to price spread option with Monte Carlo simulation was introduced. for a 2 underlying assets call spread option. the payoff is like max(S1 .cn 354 . especially in oil industry. here is another valuation method of spread options follwing the article Low-Fat Spreads by K. RISK.php。 Tags . option Please read update at http:://www. 0).

resetting the strike value at the then current price level. at which time. heston . http://www.mathfinance.net/finalgo/BatesModel. option Please read update at http:://www. It is a series of at the money options. which never knock out completely.html lists the C++ code to price Cliquet options using the Log-Jump variant of the Bates model with stochastic volatility. or paid out at each reset date.Cliquet option with Jump-Diffusion Bates Model Cliquet option. wiki(Cliquet option) Tags . with periodic settlement.cn 355 . is an extended roll-down option. with strikes set at the barriers. The profit can be accumulated until final maturity.javaquant. The Bates Model is a type of Jump-Difussion model that is able to improve calibration results for short term options.cliquet . also called ratchet option. the option locks in the difference between the old and new strike and pays that out as the profit. The Bates Model consists of Jumps processes built on top a Heston model.

.Arithmetic Game One of my friends sent me an interesting site: Arithmetic game. The Arithmetic Game is a speed drill where you are given two minutes to solve as many arithmetic problems as you can. http://zetamac. amazing. (please help us develop by submitting a site in your favorites).com/arithmetic/ This game helps me recall the exam I took for a quantitative trader position several months ago.. subtraction. and division. problems including addition.mathfinance.cn 356 . The highest score so far is 137. i failed Tags . for each problem answered correctly you will get score. multiplication.game Please read update at http:://www. test how many scores you can achieve.

ac.strath.m. also known as the Moon Festival. The payoff from an average price call is max(Save .K.higham/ch22. geometric average asian option is used as control variate for arithemetic average asian option. 0) where Save is the average value of the underlying asset calculated over a predetermined averaging period. http://personal. wish you happy everyday and achieve what you want. option Please read update at http:://www.mathfinance. A pic of Mooncake Asian options are options where the payoff depends on the average price of the underlying asset during at least some part of the life of the option. given the condition we can find a good proxy product.uk/d. Average price options are less expensive than regular options. control variate is another popular way for variance reduction.cn 357 . here is a M file demonstrating Monte Carlo simulation on an arithmetic average price Asian option using a geometric average price Asian as control variate. Besides anti-thetic sampling method.Monte Carlo arithmetic average price Asian option Today is the Chinese traditional Mid-Autumn Festival. in our case. whose pricing formula is easy to get. Tags . first of all.j. which is used to celebrate the end of the summer harvesting season.asian .

zip.finmath.mathfinance. The Constant Maturity Swaps may be of two types . option Please read update at http:://www. wiki(Constant maturity swap) Tags . Pricing of cms option and a cms floor using the generalized BlackScholes formula with a convexity adjustment Excel sample file: http://www.net/spreadsheets/CMS%20Option. Constant maturity swap is also known as CMS. at the same page http://www.Single Currency Swaps or Cross Currency Swaps.Constant Maturity Swap (CMS) option pricing Constant maturity swap is a type of interest rate swap where the rate of interest of any single leg is readjusted in a periodic manner in case of market swap rate but not with the LIBOR (London Interbank Offered Rate) or any other floating reference index rate.net/spreadsheets/ you can also find pricing of swaption using the generalized Black-Scholes formula.cn 358 .cms . In other words. it may also be said that the constant maturity swap actually allows the purchasers to fix the duration of the received flows on a swap.finmath.

more are at the main page of author http://www. which underlying.html. one of the main problems with the Black–Scholes model is that the data suggest that the log returns of stocks/indices are not Normally distributed as in the Black–Scholes model. based on a more general distribution than the normal.mathfinance.axelvogt.cn 359 .axelvogt. The log returns of most financial assets do not follow a Normal law.zip. Normal Inverse Gauss option pricer (with Esscher transform correction). it is crucial to have a good probability distribution of the underlying product.Normal Inverse Gaussian option pricer Quotation To price and model of the most famous model. we would like to have a similar.de/axalom/ NIG_tiny_withDLL. process. Moreover. The continuous-time model is the celebrated Black Scholes uses the Normal distribution to fit the log returns of the As we know from empirical research. However. but in order to model the behaviour through time we need more flexible stochastic processes (which generalize Brownian motion). such processes are called Lévy processes. Other more flexible distributions are needed. not only do we need a more flexible static distribution. in order to define such a stochastic process with independent and stationary increments.e. They are skewed and have an actual kurtosis higher than that of the Normal distribution.i.de/axalom/index. with independent and stationary increments. Looking at the definition of Brownian motion. and a Maple worksheet with short explanations can be downloaded at http://www. one example of such process is normal inverse gaussian (NIG). Tags .nig . Excel + DLL. option Please read update at http:://www. hedge derivative securities. the distribution has to be infinitely divisible.

. here is a site i introduced.net/5. Tags . MATLAB.. Don't hesitate to try it yourself. for instance. Octave. .NET. I AM a fan of it.Mixed Integer Linear Programming (MILP) solver Are you fed up with "linprog" or "fmincon" command in Matlab? do you sometimes find the results violate your providing constraints while Matlab says "condition satisfied". Several days ago a friend of mine sent me a link about lp-solver. The expression "cx" is called the objective function. Excel. PS: lp-solver can be called as a library from different languages like C. VB. and the equations "Ax=b" are called the constraints. R via a driver program. Scilab. you will find a way.sourceforge. (please submit your favorite code site if you happen to find one and help others. O-Matrix. to minimize tracking error of your portfolio. but if there is a better solution for the given problem.) The name itself tells you this package is for linear programming problem. cannot help sharing with you all. and c and b are vectors of known coefficients. which is a Mixed Integer Linear Programming (MILP) solver. etc. Delphi. A is a matrix of known coefficients. etc. Download at http://lpsolve.5/.cn 360 . convenient to use and highly efficient. or sometimes you get a weird solution while Matlab tells you "convergence successful". Java. to mimic the performance of an index. LP is widely used for portfolio optimization.mathfinance. (I am not saying bad words about Matlab. What is Linear Programming then? A Linear Program (LP) is a problem that can be expressed as follows: minimize cx subject to Ax = b x >= 0 where x is the vector of variables to be solved for. why not at least try it?) Optimization packages are widelyspread. optimization package. thanx.It can also be called from AMPL.optimization Please read update at http:://www..

mathworks. Least square Monte Carlo simulation. to name a few: binomial tree. option Please read update at http:://www. lsm .american . numerically solving PDE. enjoy. http://www.Pricing American Options American options can be computed by several ways. Previously I share a PSOR code to calculate Linear Complementarity Formulation problem when applying finite difference or finite element for american option.cn 361 .mathfinance.do?objectId=16476&objectType=file. Tags .com/matlabcentral/fileexchange/ loadFile. here is a file including: * GUI for pricing through CRR binormial tree * Script for pricing with Finitie differences * GUI for pricing via the Monte Carlo method of Longstaff and Schwartz * Functions to implement all three methods you'll have a clear picture in mind how to deal with American-type options.

dhis.xls shows how to implement Boostrapping method in Excel. yield Please read update at http:://www.org/index_eng2.Bootstrapping interest rate curve Bootstrapping is a technique for building a zero-coupon yield curve from the prices of a set of coupon bonds through forward replacement. The term structure of spot rates is recovered from the bond yields by solving for them recursively.cn 362 . Using these zero-coupon bonds we can deduce forward and spot rates for all time to maturities by making a couple of assumptions (including linear interpolation). Tags . this iterative process is called the BootStrap Method. http://janroman.html.bootstrapping .dhis. more can be found at his website http://janroman.org/stud/Bootstrap_2006.mathfinance.

going to leave soon the country i have stayed over one year. In other words.mathfinance. for instance use Gaussian variates to simulate Brownian motion by constructing sample paths of standard Wiener processes.variance-reduction Please read update at http:://www.m.ma. Run the sample code to check the variance reduction effect if you wish http://www.uk/~becherer/Course07MS15/ antitheticexample. we also use vvi = v(−zi). specially a girl i favor. leave friends accompanying me when i was sad and joyful. we have to accept this fact.ac. Whenever we price a derivative via Monte Carlo simulation.ic. All feasts must come to an end.Variance reduction by antithetic variable Had a small party with friends yesterday and drank until 5 o'clock in the morning.cn 363 . hangover is still here after 6 hours sleep. we can make use of the fact that for any one drawn path its mirror image has equal probability. if a single evaluation driven by a Gaussian variate vector draw zi is given by vi = v(zi). which is called antithetic sampling and widely used for variance reduction because of its simplicity to add to your code. Back to code. Tags .

Checking that the model is arbitrage-free and that bond price processes have suitable properties (e. As a result. Q. implied interest rates are always non-negative) can be a cumbersome task.columbia.cn 364 . we usually work with term structure models where we directly specify an EMM. short-rate values at nodes or Q-probabilities along branches in a lattice model) we can then calibrate them so that security prices in the model coincide with security prices observed in the market. with term-structure models we often assume that zerocoupon bonds of every maturity exists and it is not always easy to directly specify their P-dynamics in an arbitrage-free manner that it is economically satisfactory. are determined. such a model is arbitrage free. In the lecture notes of Term Structure Models-Spring 2005 professor Martin Haugh introduces how to price a Bermudan swaption with term structure lattice.xls wiki(Bermudan swaption) Tags . bermudan Please read update at http:://www. binomial tree. in the binomial Black-Scholes framework a unique Q is easily determined after the P-dynamics of the stock-price are given.columbia.pdf and sample spreedsheet is http://www. For example. lecture notes about this topic is http://www. Moreover. By construction. P.mathfinance. before their dynamics under an EMM. in a T-period binomial model there are O(T) zero-coupon bond prices that we need to specify at each node.edu/~mh2078/ TS05/lattice_models.Term Structure Lattice to Price Bermudan swaption The modelling philosophy for term-structure models is somewhat different to the modelling philosophy for equity models. precisely speaking. In contrast. In the latter case. For example. and price all securities using this EMM.edu/~mh2078/TS05/ Term_Structure_Lattices. Moreover. there he cailibrates both Ho-Lee and Black Derman Toy Model and use the calibrated interested rate model to price a Bermudan swaption as an example.swaption . it is easy to check that the model does not allow any arbitrage: we just need d < R < u. by leaving some parameters initially unspecified (e.g. Q. stock price dynamics are usually specified under the physical probability measure.g.

therefore. both methods require space discretization.uk/ ~aas96106/ch24.strath. more codes are at the homepage http://www. however.html wiki(Crank Nicolson) Tags . to satisfy CFL condition.uk/~aas96106/option_book. which means taking average of explicit and implicit method. Crank-Nicolson is supposed to balance between explicit and implicit finite difference by choosing theta=1/2.maths.Crank-Nicolson for a European put A PDE can be solved by Finite Difference or Finite Element method. it is from chapter 24 of the book An Introduction to Financial Option Valuation: Mathematics. explicit or implicit finite difference is applied for this problem.cn 365 .m.ac.mathfinance.ac.pde Please read update at http:://www. Stochastics and Computation.strath. A sample code to show the performance of Crank Nicolson for a Europen put can be downloaded at http://www.maths. The advantage of explicit finite difference is it does not require matrix inversion. dt (time interval) can not be too small to prevent from nonconvergece result.

optimization Please read update at http:://www. EAs differ from more traditional optimization techniques in that they involve a search from a "population" of solutions. for detail check http://cran. This R package provides the DEoptim function which performs Differential Evolution Optimization (evolutionary algorithm). not from a single point.cn 366 .html. The solutions with high "fitness" are "recombined" with other solutions by swaping parts of a solution with another. wiki(Evolutionary algorithm) Tags . here I am going to share a special optimization method: evolutionary algorithm. Recombination and mutation are used to generate new solutions that are biased towards regions of the space for which good solutions have already been seen.evolutionary algorithm optimization In the post Optimization packages dozens of optimization routines can be downloaded. Each iteration of an EA involves a competitive selection that weeds out poor solutions. Evolutionary algorithms (EAs) are search methods that take their inspiration from natural selection and survival of the fittest in the biological world.r-project.org/web/packages/DEoptim/index. Solutions are also "mutated" by making a small change to a single element of the solution.mathfinance.

which can be solved numerically by Finite Element or Finite Difference method. pde Please read update at http:://www.finite-element .g. the logprice space variable. " what's more interesting is this library can be linked easily to Matlab.cn 367 . not only 2D and 3D problems). Indeed Matlab has a PDE toolbox to use. this PDE toolbox can only calculate two dimensional problem. and for arbitrary dimension (i. as its webpage says. as e. The goal is to provide a library allowing the computation of any elementary matrix (even for mixed finite element methods) on the largest class of methods and elements. We know Finite Element method is an alternative to Finite Difference discretization of the BS and other equations in the price resp. for binary contracts and in particular allow a higher rate of convergence that that achievable with Monte Carlo simulations. To get a deeper insight on and download open source Getfem++ please be at http://home. "The Getfem++ project focuses on the development of a generic and efficient C++ library for finite element methods.mathfinance. actually) derivative via partial differencial equation (PDE).Finite Element package Recently I have been working on pricing a high dimensional (4 dimension. for instance. The advantage of FE is that it gives convergent deterministic approximations of the option price under realistic.e. low smoothness assumptions on the payoff function. I found an excellent Finite Element package named Getfem++ written in C++. stock and time dimension as Black Scholes model does.org/getfem/ wiki(Finite element) Tags . For your attention. however.gna. as I know.

despite this shortcoming. long-run average rate and volatility. speed of mean reversion. Vasicek model is a term structure model describing the stochastic process of interest rates. it is still applied for fixed income research and application due to its mean-reversion characteristics.Vasicek model in binomial tree At previous post I shared a site using R language for Vasicek estimation. For detail check this page http://math.mathfinance. the tree construction procedure is outlined in Tuckman famous book Fixed Income Securities. binomial Please read update at http:://www. By providing input parameters like the initial short rate. as we know.edu/~atm262/spring06/ ircm/vasicek/. interest rate following Vasicek evolution is constructed.vasicek . It is a type of "one-factor model" with negative interest rate possible.cn 368 . Tags . Here is another Vasicek application implemented with binomial tree in C++.nyu.

. What are the empirical characteristics of business cycles? What brings business cycles about? What propagates them? Who is most affected and how large would be the welfare gains of eliminating them? What can economic policy...org/s/dge/qmrbcd.mathfinance...economics Please read update at http:://www.cn 369 .repec.html Tags . click the following link for codes in Quant economics of different programming languages. http://ideas. Sounds boring? I found this site when I searched "Kalman filter". both fiscal and monetary policy do in order to soften or eliminate business cycles? Should the government try to do so? . which uses standard neoclassical theory to explain business cycle fluctuations and tries to answer the following questions.Code for Quantitative Macroeconomics I am not a fan of Quantitative Macroeconomics. to name a few.

you can download the free c course code by leaving your email at http://www. The dynamic of the Libor Market Model will be derived and the whole steps of its implementation applying Monte Carlo simulation will be introduced.Libor Market Model: Theory and Implementation source code Libor Market Model is a term structure model applied to value and hedge exotic interest rate derivatives. Implementation is accomplished via several volatility and correlation formulation.cn 370 .libor Please read update at http:://www. This consistency makes the calibration process easy as the Black's market prices for vanilla interest rate Options can be instantly used as an input. European swaptions and ratchets. Special attention should be given when it comes to calibrate the Libor Market Model and model the forward rate volatilities and correlations since they could impact prices of interest rate derivatives substantially. etc.com/libor-market-model/app#order wiki(LIBOR Market Model) Tags .mathfinance. The purpose of this book -Libor Market Model: Theory and Implementation is to analyze the Libor Market Model in theory and implement it practically to the evaluation of normal caps.irina-goetsch. barriers. Black's formula. The model is recognized and employed largely because of its consistency with the popular market model.

com/code/matlab/ EuropeanExchange.cn 371 .com/ index.0) A formula for valuing this option was first produced by Margrabe at his paper “The value of an option to exchange one asset for another”.global-derivatives. the payoff from the option is max(VT-ST.European Exchage Options Options to exchange one asset for another arise in various contexts.global-derivatives. Journal of Finance. option Please read update at http:://www.exchange . An option to buy yen with Australian dollars is. derivative .php?option=com_content&task=view&id=184 wiki(Foreign exchange option) Tags . an option to exchange one foreign currency asset for another foreign currency asset.mathfinance. from the point of view of a US investor. a sample Matlab file can be downloaded here http://www. Consider a European option to give up an asset worth ST at time T and receive in return an asset worth VT. A stock lender offer is an option to exchange shares in one stock for shares in another stock.m http://www.

zero).cn 372 . Click to download Tags . in an ever refining algorithm. and then add more and more of the fine structure.brownian bridge simulation Quotation Similar to the spectral path construction method. The procedure is then repeated to gradually fill in all of the realisations of the Wiener process at all intermediate points. here is a simulation of Brownian paths.mathfinance. The very first variate z1 is used to determine the realisation of theWiener path at the final time tn of our n-point discretisation of the path by setting Wtn = sqrt(tn)z1. The next variate is then used to determine the value of the Wiener process as it was realised at an intermediate timestep tj conditional on the realisation at tn (and at t0 = 0 which is.brownian-bridge Please read update at http:://www. of course. brownian-bridge type simulation. the Brownian bridge is a way to construct a discretised Wiener process path by using the first Gaussian variates in a vector draw z to shape the overall features of the path.

info/ValuingSwaptions. Normally. a spreedsheet showing how to price a swaption in a tree can be downloaded at: http://www.anassabri. Nevertheless. They can be physically settled. They can be cash settled as well. in which case a derivative is really participated into at exercise date. A receiver swaption is a call option on a receive fixed swap. it is frequently more handy to address in terms of two common kinds of swaption: A payer swaption is a call option on a pay-fixed swap. the underlying swap is a vanilla interest rate swap.swaption Please read update at http:://www.mathfinance.cn 373 .xls wiki(Swaption) Tags . in which example the market price of the underlying swap is cleared at maturity. the swaption holder has the right to pay fixed rate on a swap. American. "swaption" could be applied to relate to a derivative about whatever kind of swap. the swaption holder has the right to receive fixed rate on a swap. or even Bermudan type. Swaptions could be European.Swaption valuation A swaption is an over-the-counter derivative on a swap.

The additional major benefit of PCA is that after you have obtained these patterns in the data. and conveying the data in such a manner to spotlight their similarities and divergences.cn 374 . etc. for instance. Because patterns in data can be difficult to detect in data of high dimension. VaR calculation of porfolio. without much loss of information.m wiki(principal component analysis) Tags .principal component analysis Principal component analysis (PCA) is widely used for data research. interest rate analysis. http://www.pca Please read update at http:://www.mathfinance.theponytail. What is PCA? It is a method of discovering patterns in data. ie. where the luxury of graphical representation is not available. PCA is a potent tool for analysing data. and you compact the data.net/CCFEA/lect04/lect04pc.theponytail. by reducing the number of dimensions.net/CCFEA/ http://www.

cn 375 .xls wiki(Nelson-Siegel) Tags . Simultaneous pricing of dierent options and hedging instruments in a consistent framework.yield . here is a spreedsheet showing how to fit Extended Nelson Siegel Spot Rate with Solver.dhis.org/ http://janroman.org/finance/Excel/ NelsonSiegelYieldCurveModel. Historical estimation of such large covariance matrices is statistically not tractable anymore.Nelson Siegel interest rate model calibration Often we need to model the yield curve for bond pricing and risk analysis purpose. NelsonSiegel term structure model is one of them gained popularity. Specify the dynamics of a small number of variables (e.mathfinance. nelson-siegel Please read update at http:://www. for instance. PCA). http://janroman.dhis. The valuation of products requires the modelling of the entire covariance structure.g. Correlation structure among observable quantities can now be obtained analytically or numerically. Need strong structure to be imposed on the co-movements of financial quantities of interest. There are dozens of interest rate models used by practioners.

cs. good news for Mathematica fans.Combinatorica mathematica package Oops. http://www.cn 376 . first post on Mathematica.uiowa. However. here I found an excellent Mathematica package named "The Combinatorica Project".mathematica Please read update at http:://www.mathfinance.edu/~sriram/Combinatorica/ Tags . which is a package written in 1989 by Steve Skiena for exercising computational discrete mathematics. I simply love Matlab and C++. have fun and enjoy new week. due to their popularity and easy-to-use. simply because I dont use it for research. here is the introductory page and downloading link.

b.psor . for i = 1:n x(i) = max(0. tol = 1e-9. j = 1. end while (norm(x-x0) > tol) && (j < jmax) j = j + 1.5. function [x] = psor(A. x0 = x.:)*x)/A(i. option Please read update at http:://www. Should you are happy with C++.b) = 0 x >= 0 Ax .PSOR for American option We often have to price the American Option with Linear Complementarity Formulation when using finite difference method.i)). Here is a sample Matlab code showing the basic algorithem of PSOR. end end return A problem with this sample code is slow computation speed.i)).b >= 0 using the projected SOR algorithm. Click to download wiki(Linear complementarity problem) Tags . x = x0.mathfinance.x(i)+omega*(b(i)-A(i.:)*x)/A(i.x(i)+omega*(b(i)-A(i. which is iterative and tries to solve the following formulation: x'(Ax .x0) omega = 1. n = length(b). the following C++ code which can be called directly in Matlab. for i = 1:n x(i) = max(0. american .cn 377 . One of methods for solving linear complementarity problem is Projected Successive Over Relaxation (PSOR). jmax = 1e+3.

iq Please read update at http:://www.com/docs/FinanceIQ.xls Tags . http://www.Finance IQ test Weekend Time! interested into doing a short test on your finance IQ? Finance IQ is designed to test your knowledge in finance. for instance.fintools.cn 378 . The questions database includes various categories to choose. Take a rest & have fun.mathfinance. you can choose to test your Risk IQ or Options IQ. Kind reminding: today is the last day of Beijing Olimpic and closing ceremony will be staging. level could be from as easy as the definition of European option. black scholes to FRM test or even more advanced.

mathfinance. The payoff from a European-style lookback call is the amount that the final asset price exceeds the minimum asset price achieved during the life of the option.m Tags . exotic .lookback . The payoff from a European-style lookback put is the amount by which the maximumasset price achieved during the life of the option exceeds the final asset price.com/code/matlab/LookbackFloatingStrike.Floating Strike Lookback Option The payoffs from lookback options depend on the maximum or minimum asset price reached during the life of the option. Floating Strike Lookback Options means the strike is given as the optimal(maximum or minimum) value of the underlying asset.cn 379 . option Please read update at http:://www.global-derivatives. Matlab code for pricing it is here: http://www.

cn 380 .essex. below is an Excel file demonstrating many assets Efficient Portfolio can be generated by solver. optimization Please read update at http:://www.mathfinance. weight limits. amongst them all. We could also specify a correlation of returns. choose the one with highest expected return.xls wiki(Capital asset pricing model) Tags . second: for a given expected return. count all portfolios having this expected return. we could impute expected returns and volatilities. Given a time interval.ac. The theory deals an amounts of risky products and searches an optimal portfolio based on those possible investments. often numerical calculation is applied for optimization as we have additional constraints on the optimal portfolio.uk/ccfea/Teaching/Archive/200304/Quant/ 3%20Portfolio%20Analysis/Efficient%20Portfolio.Markowitz Efficient Frontier stock portfolio The efficient frontier was initiative specified by Markowitz in his innovative report . for instance. The "optimal" portfolio can be formed in two methods: first: for a certain level of volatility. count all portfolios that equal this volatility. etc. http://www.markowitz . Choose the one which has the lowest volatility.

cn 381 .mathfinance.copula Please read update at http:://www. to help you visualize what on earth the copula should look like.um. how to test its performance.. performance. PS: I just finished my Copuls exam one hour ago.ac. etc.. below R code draws plots of some widely used copulas..R Tags .at/~mkeller/R-progs/copula.tuwien.Visualize Copulas In those Copula codes you can get a rough idea what copula is. http://www.fam... how to estimate and simulate it.... Fighting.

JQuantLib is aiming at these Java-fans group. open-source. they have to read & understand C++ codes and transfer them to Java code. for those people prefer Java language.mathfinance. Is there MQuantLib for Matlab fans? Tags . comprehensive framework for quantitative finance. among other features. and risk management in reallife written in C++.quantlib . which is a free/open-source library for quantitative finance for modeling. trading. It provides "quants" and Java application developers several mathematical and statistical tools needed for the valuation of financial instruments.Java Quantlib Many people know QuantLib. written in Java. Quotation JQuantLib is a free. java Please read update at http:://www.cn 382 .

mathfinance.txt wiki(SABR Volatility Model) Tags .stochastic .pdf http://www. failure to do so will clearly cause the model not arbitrage free and generate it nearly useless.axelvogt. volatility Please read update at http:://www. SABR code in VBA and C is available together with a PDF: http://www.de/axalom/SABR. Basically it has been shown that the price of a vanilla option under the SABR model is yielded by the suitable Black model.axelvogt. given that the correct implied volatility is employed. A substantial point of the SABR model is that the prices of vanilla options can be computed in almost closed form (Subject to the precise of a series expansion).de/axalom/SABR_Code_VB_and_C.SABR stochastic volatility model A suitable characteristic of any local and stochastic volatility model is that the model can yield the same prices of the vanilla options that were applied as inputs to the calibration of the model.cn 383 .

. Below is the matlab file for Copula simulation and estimation. we can model the margins nonparametricaly and use a parametric copula model to describe their dependence. This comes in especially handy when we either already have some information about the margins (e.Copula simulation and estimation Copula is widely used for multi-variate modeling.copula Please read update at http:://www... orderings and measures of association depend on H only through C and are in other words margin-free. http://www.do?objectId=15449 wiki(Copula) Tags . • Copulas allow us to easily construct (and simulate from) multivariate distributions with given univariate margins.g..mathworks. Copula has at least the following application: • Copulas provide us with a deeper understanding of dependence as such. In the latter case.cn 384 .mathfinance. generally speaking. especially when the underlying marginal distributions are not the same.. • Many dependence concepts. enjoy. . This fact is particularly useful for stress testing. in the bottom-up approach in risk management) or if finding appropriate marginal distributions is difficult.com/matlabcentral/fileexchange/ loadFile. • Multivariate data can be modeled in two separate stages: The univariate marginals can be handled first and their dependence structure thereafter.

perl . http://www. The code comprises of a Perl module incorporating routines to do option pricing and related computations.cn 385 .mathfinance. confer with Espen Gaarder Haug (1998) Option Pricing Formulas. McGraw-Hill.html Tags . A former version of the Perl module was utilized to produce market analysis software package. option Please read update at http:://www. The routines were all deduced from the pseudocode there.kmri.com/software/popp.Perl Option Pricing Project Derivatives can be valued applying a mixture of statistical models. Software documentation For a fantabulous reference on derivative pricing.

mathfinance. A matlab code for plot the GEV distribution and density function http://www.essex. where shape parameter decides the distribution is Frechet. extreme Please read update at http:://www.uk/ccfea/Teaching/Archive/200405/CF901/ weeks3and4/plot_GEV_densities.gev .cn 386 . Weibull or Gumbel.ac.txt wiki(Generalized extreme value distribution) Tags . location and scale.GEV distribution and density function The role of the generalized extreme value (GEV) distribution in the theory of extremes is analogous to that of the normal distribution (and more generally the stable laws) in the central limit thoory for sums of random varibles. The df of the GEV distribution is given by a threeparameter family: shapre.

for instance.html wiki(Multivariate normal distribution) Tags .cdf Please read update at http:://www. Here is one of such methods in M file.cn 387 . basket option pricing.strashny. portfolio VaR analysis. In statistics. There are.mathfinance. the multivariate normal (mvn) is a widely-used distribution. nevertheless. its cumulative distribution function (cdf) doesn't take a closed form. http://alex. Unluckily.Multivariate normal CDF As a generalization of the normal or Gauss distribution to many dimensions we define the multinormal distribution.org/a/Multivariate-normal-cumulativedistribution-function-(cdf)-in-MATLAB. amounts of techniques that numerically approximate the value of the cdf.

for example.eln Please read update at http:://www.be/cours/solvay/farber/VUB/ 08%20Lecture%202.htm http://www. This spreadsheet calculates the price and embedded option value of equity linked notes.xls wiki(Equity linked note) Tags . but differs from a standard fixedcoupon bond because its coupon is decided by the performance of the underlying equity. basket of stocks or equity index.ac.mathfinance.cn 388 .Equity linked notes An Equity-Linked Note (ELN) is a debt tool that differs from a normal fixed-income security due to the coupon is depend on the return of a single stock. Robeco-Reverse convertible.be/cours/solvay/farber/exceltips. http://www.ac. An ELN is a principal secured instrument Commonly configured to generate 100% of the original investment at due date.ulb. together with other option.ulb.

the mean-reverting process. including Brownian motion simulation. Euler scheme simulation for Geometric Brownian motion.math. Poisson process simulatio.Process Simulation in R Simple demonstration codes for process simulation in R.simulation Please read update at http:://www. etc.cn 389 .mathfinance.html#Code Tags . http://www.dk/~rolf/teaching/mfe04/MiscInfo. and the process with two 'attractors'.ku.

and robust programming are often encountered in financial models.Optimization packages Optimization models play an increasingly important role in financial decisions.edu/~mitchj/pack. Several classes of optimization problems including linear. from option pricing to model calibration can be solved efficiently using modern optimization techniques.cn 390 . http://www.html#abacus wiki(Optimization) Tags .mathfinance. conic. integer. This site collects dozens of optimization packages in different programming languages. you will find one for you.optimization Please read update at http:://www. quadratic. dynamic.rpi. Many computational nance problems ranging from asset allocation to risk management. stochastic.

useful for valuing the patents that a company may declare.nyu. Real Option Models in Valuation A example that applies option pricing to measure the equity in a company.htm#optincf wiki(Real option) Tags .cn 391 .edu/~adamodar/New_Home_Page/ spreadsh.e. This example estimates the value of the option to give up a project or investment. most well suitable for largely levered firms in trouble. useful for measuring oil or mining companies.real-option .Real Option Models in Valuation Real Option good example in Corporate Finance This example approximates the economic value of the option to extend in an investing project. This example estimates the value of fiscal tractability. the sustenance of extra debt capability or back-up funding. A model that applies option pricing to evaluate a natural resource firm. i. A model that applies option pricing to appraise a product patent or option. This example calculates the value of the option to postpone an investment project. it can also be used to appraise the value of strategic options.stern. option Please read update at http:://www. http://pages.mathfinance.

barra. Brinson method decomposes active return to asset selection effect and industry selection effect. http://www. ect. helping investor realize where the active return is from. the difference of which is called active return.performance Please read update at http:://www.Brinson performance attribution Performance attribution is used as a way to check the relative performance of portfolio against selected Benchmark.com/products/spreadsheets/stockselection. which asset or industry has a biggest contribution to the active return of portfolio.xls wiki(Performance attribution) Tags .mathfinance.cn 392 .

html#Code wiki(Vasicek model) Tags . Vasicek. the swaptions volatility surface. Cox Ingersoll Ross (CIR).math. R code can be downloaded at http://www. cox ingersoll ross Please read update at http:://www. are among the frequently-used short-rate models. thus determining the model parameters.R-code for Vasicek estimation A short-rate model is usually calibrated to some initial structures in the market. and possibly other products.ku. The strength of Vasicek model is analytical bond prices and analytical option prices can be obtained and easily calculatied.vasicek . negative short rates are also possible with positive probability. however. the caps volatility surface.cn 393 .mathfinance. for instance. typically the initial yield curve. Dothan.dk/~rolf/teaching/ mfe04/MiscInfo.

they are written by a company on its own stock. http://pages. when they are exercised. which has the dilution effect on the price of warrant as a result. the exercise of a warrant therefore leads to an increase in the number of shares of the company's stock that are outstanding. however.htm#basicoption Tags .Valuing Warrants under dilution Usually.edu/~adamodar/New_Home_Page/ spreadsh.warrant Please read update at http:://www. often we ignore this dilution effect as it might be small. executive stock options as well.stern. here is a spreedsheet model for valuing options that result in dilution of the underlying stock if you do want to consider it.nyu.mathfinance. the company issues more of its own stock and sells them to the option holder for the strike price. are options that work slightly differently. when a call option on a stock is exercised.cn 394 . the party with the short position acquires shares that have already been issued and sells them to the counterparty. warrants.

edu/~hanson/mcs507/cp4f04. but instead to take into account which points in the domain to be sampled have already been probed.math. low-discrepancy numbers aim not to be serially uncorrelated. sobol Please read update at http:://www. and Niederreiter as well. although sometimes I compare other sequences like Faure. Low-discrepancy numbers have become a popular tool for financial Monte Carlo calculations since the early 1990s.html wiki(Low-discrepancy sequence) Tags .halton . Haselgrove. Unlike pseudo-random numbers. especially when the problem to solve is a low dimensional one.uic.mathfinance.cn 395 . http://www.halton and sobol sequences I couldnot stop using Quasi Monte Carlo simulation for derivative pricing. Halton sequences and sobol sequences are two of my favorites. Among low discrepancy random numbers.

normal .com/matlabcentral/fileexchange/ loadFile. For any reasonable application.mathworks. monte carlo Please read update at http:://www. http://www. A very crude way to quickly construct (approximately) normally distributed variates is to add up 12 uniform variates.mathfinance. Moro is one of such techniques. how to inverse that to normal random numbers require numerical technique. or Boris Moro’s interpolation formula.Beasley-Springer-Moro inverse normal Once you get uniform random numbers. Quotation my favourite method for constructing standard normal variates is the highly sophisticated interpolation formula by Peter Acklam for the inverse cumulative normal distribution.do?objectId=14234&objectType=file Tags . and subtract 6.cn 396 . I would always use either Peter Acklam’s method.

Calculations are performed within the standard Black-Scholes model.nl/~dimitri/pricing. Double barrier options are approximated using a Fourier series approximation. calculator .) http://www.barrier .neumann. unless volatility is low. option Please read update at http:://www. For plain vanilla and single barrier options. For low volatility an alternative series expansion is used.html wiki(barrier option) Tags .Barrier Option Calculator tran(This program can calculate values and greeks for plain vanilla options as well as single and double barrier options with or without rebate. the calculation is purely analytical.cn 397 .mathfinance.

toronto.cn 398 .monte carlo . chooser .utstat. http://fisher.mathfinance.edu/sjaimung/courses/2008-2009/sta2502/ main. option Please read update at http:://www.htm Tags .Monte Carlo Chooser Option Chooser option gives the holder the right to choose it is a call or put option at a prescriped strike price and date. here is a sample spreedsheet pricing chooser option with Monte Carlo simulation.

filter Please read update at http:://www.net/projects/ssmodels/ wiki(kalman filter) Tags . http://sourceforge.State space model toolbox Another MATLAB toolbox for time series analysis using state space models.cn 399 .mathfinance. Supports fully interactive model construction with MATLAB objects and efficient Kalman filter backend implemented in c.

cn 400 .mathfinance. take a trial. they have been proved to be able to improve convergence speed. etc. faure Please read update at http:://www. accuracy. http://web.Sobol and Generalised Faure sequences Low discrepancy sequences are highly recommended for lowdimensional Monte Carlo simulation.za/NR/rdonlyres/96ECC07EAE3C-4706-94F8-C1A53011AF38/0/searlecode.sobol .ac.zip wiki(Low-discrepancy sequence) Tags .wits.

html Tags .uk/Consult/Derivative/Derivatives. http://www.montegodata. option Please read update at http:://www. you can download them or calculate the formula online. Black Scholes 1973.cn 401 .co.mathfinance. for instance.Entire Equity and Monetary Option Formulas lots of equity and monetary option model available in VBA.derivative . calculator .

ch/MatlabCodes/ Tags . which was used by my professor last semester. Cheers.Code for Financial Distributions Modeling Under Non-Gaussian This site stores matlab codes accompanying the book Financial Modeling Under Non-Gaussian Distributions.matlab Please read update at http:://www. a wonderful and easy to read book.unil.cn 402 . http://www.hec. you can imagine how much this site has helped me.mathfinance.

html wiki(black scholes) Tags . but how many language can you use? I can do it in Matlab. Guess what. VBA.com/black_scholes. this site collects more than 30 languages.cn 403 .Black Scholes in Multiple Languages Black Scholes formula is widely used for vanilla option pricing.mathfinance.black scholes Please read update at http:://www. GAUSS. which is also easy to code. PHP.espenhaug. have fun! http://www. C++.

net/CCFEA/ wiki(Volatility smile) Tags . Code in Matlab.volatility . http://theponytail. binomial Please read update at http:://www.mathfinance.Calibration of a binomial tree to the volatility surface How to calibrate a binomial tree to the volatility surface implied from market option prices. smile .cn 404 .

Knock in and out Options with JumpDiffusion Monte Carlo Pricer European Spread Options with Jump-Diffusion Table with Java sources Closed expressions and Approximate Models for various Financial Option on Equity Binary Tree method to Price Options on Equity Monte Carlo pricer of Exotics Monte Carlo Pricer of American Calls and Puts Monte Carlo Pricer of European Barrier. Knock in and out Options Monte Carlo Pricer European Spread Options Monte Carlo Pricer of Interest Rate Derivatives (One factor) Monte Carlo Pricer Ho Lee Model Monte Carlo Pricer Hull White Model Monte Carlo Pricer Black Derman Toy Model Monte Carlo Pricer Brace Gatarek Musiela / Jamishidian Model Monte Carlo pricer of exotics with constant Jump-Diffussion Monte Carlo Pricer of Barrier.cn 405 . Knock in and out Options Monte Carlo Pricer European Spread Options Monte Carlo Pricer of Interest Rate Derivatives (One factor) Monte Carlo Pricer Ho Lee Model Please read update at http:://www.T Table with C++ sources Closed expressions and Approximate Models for various Financial Option on Equity Binary Tree method to Price Options on Equity Monte Carlo pricer of Exotics Monte Carlo Pricer of American Calls and Puts Monte Carlo Pricer of European Barrier.Monte Carlo Pricer Black Derman Toy Model Financial Quantitative Algorithms below you will find the some sources of the sources in C++ and Java.mathfinance.

net/downloads.mathfinance.javaquant.bdt .cn 406 . Knock in and out Options with JumpDiffusion Monte Carlo Pricer European Spread Options with Jump-Diffusion http://www.Monte Carlo Pricer Hull White Model Monte Carlo Pricer Black Derman Toy Model Monte Carlo Pricer Brace Gatarek Musiela / Jamishidian Model Monte Carlo pricer of exotics with constant Jump-Diffussion Monte Carlo Pricer of Barrier. monte carlo Please read update at http:://www.html wiki(Black Derman Toy) Tags .

download option price data from Yahoo This R program can be used to download option price data from Yahoo to a data frame and to plot the corresponding implied-volatility smiles.download .fam.at/~mkeller/ Tags .tuwien. http://www. data .cn 407 .mathfinance.ac. option Please read update at http:://www.

edu/~mayest/FIN4600/Files/famadcmp.cn 408 .xls Tags .mathfinance.mscd. http://clem.fama Please read update at http:://www.Famas Return Decomposition A sample spreedsheet demonstrating how to decompose Fama's return into several sources.

com/finance/ wiki(Swaption) Tags .cn 409 .mathfinance.vbnumericalmethods.Receiver Swaption Price Calcualtes the price of a receiver swaption (bp). http://www.swaption Please read update at http:://www.

By supplementing the estimation of conditional mean functions with techniques for estimating an entire family of conditional quantile functions.edu/~roger/research/rq/rq.uiuc.econ. and the full range of other conditional quantile functions. quantile regression methods offer a mechanism for estimating models for the conditional median function. Just as classical linear regression methods based on minimizing sums of squared residuals enable one to estimate models for conditional mean functions.Quantile Regression Quantile regression is a statistical technique intended to estimate. quantile regression is capable of providing a more complete statistical analysis of the stochastic relationships among random variables.regression Please read update at http:://www. conditional quantile functions. and conduct inference about.html wiki(Quantile regression) Tags .cn 410 . http://www.mathfinance.

net/CCFEA wiki(heston model) Tags .theponytail.calibration of the Heston SV model http://www.cn 411 .mathfinance. calibration Please read update at http:://www.hestonvolatility .

copula Please read update at http:://www.cn 412 .cdo . more at http://math.nyu.edu/~atm262/spring06/ircm/cdo/index. This defect is sometimes used to calculate payments to fixed and floating legs and worth of each leg.mathfinance.html wiki(Collateralized debt obligations) Tags .CDO Pricing in Gaussian Copula CDO prices with Monte Carlo simulation includes the creation of roads in the sample correlation preset times.

cn 413 . http://people.jussieu.simulating a two-dimensional variance gamma process with Clayton dependence structure Simulates two dependent variance gamma processes without drift.copula . levy Please read update at http:://www.mathfinance.fr/~tankov/florence/ wiki(Variance-gamma distribution) Tags .math. dependence is given by Clayton Levy copula with parameters theta and rho.

mathfinance.volatility Please read update at http:://www. http://www.net/performanceanalysis/ ?Downloads:VBA wiki(EWMA) Tags .cn 414 .EWMA Volatility VB function to calculate 'exponentially weighted moving average' volatilites (=RiskMetrics volatility forecasting) with or without assuming a zero mean return.andreassteiner.

black scholes .cn 415 .com/finance/ wiki(Implied volatility) Tags .vbnumericalmethods. http://www. This function uses the super black scholes function.mathfinance.Black Scholes Implied Volatility Calculates the implied volatility of an european option using bi-section method. volatility Please read update at http:://www.

libor .net/downloads. Knock in and out Options Monte Carlo Pricer European Spread Options Monte Carlo Pricer of Interest Rate Derivatives (One factor) Monte Carlo Pricer Ho Lee Model Monte Carlo Pricer Hull White Model Monte Carlo Pricer Black Derman Toy Model Monte Carlo Pricer Brace Gatarek Musiela / Jamishidian Model Monte Carlo pricer of exotics with constant Jump-Diffussion Monte Carlo Pricer of Barrier.html wiki(LIBOR Market Model) Tags .mathfinance.javaquant. Knock in and out Options with JumpDiffusion Monte Carlo Pricer European Spread Options with Jump-Diffusion http://www.Monte Carlo Pricer Brace Gatarek Musiela / Jamishidian Model Table with Java sources Closed expressions and Approximate Models for various Financial Option on Equity Binary Tree method to Price Options on Equity Monte Carlo pricer of Exotics Monte Carlo Pricer of American Calls and Puts Monte Carlo Pricer of European Barrier.cn 416 . bgm Please read update at http:://www.

javaquant. option Please read update at http:://www.cn 417 .barrier . codes are in Java language. Knock in and out Options with Jump-Diffusion how to price barrier options with jump-diffusion by monte carlo simulations. http://www.Monte Carlo Pricer of Barrier.mathfinance.net/downloads.html wiki(Barrier option) Tags .

vbnumericalmethods.outperformance .mathfinance.cn 418 . option Please read update at http:://www.Outperformance Options Price Computes the price of an outperformance option. http://www.com/finance/ wiki(Exotic option) Tags .

cn 419 .mathfinance. http://www.com/finance/ wiki(Rainbow option) Tags .Rainbow Option Price Calculates the price of a (two-coloured rainbow) option delivering the best of two risky assets or cash.rainbow .vbnumericalmethods. option Please read update at http:://www.

* Download toolbox * What is a Kalman filter? * Example of Kalman filtering and smoothing for tracking * What about non-linear and non-Gaussian systems? * Other software for Kalman filtering.mathfinance. smoothing and parameter estimation (using EM) for Linear Dynamical Systems.ubc. etc.cs.html wiki(Kalman filter) Tags .filter Please read update at http:://www.Kalman filter toolbox for Matlab This toolbox supports filtering.cn 420 . * Recommended reading more at http://www.ca/~murphyk/Software/Kalman/ kalman.

uu.mathfinance.cn 421 .se/research/telecom/software/ Tags .math.Stochastic simulation using MATLAB This tutorial contains Matlab code and documentation for a seminar on stochastic simulation. The program package demonstrates basic techniques for effective simulation and visualization of various stochastic processes and random mechanisms. We try to emphasize methods that are natural given the matrix and vector oriented nature of Matlab. The goal is that users of this material find inspiration and ideas to prepare their own code for a particular application involving random dynamics. http://www.simulation Please read update at http:://www.

http://www.htm wiki(Convertible bond) Tags .yieldcurve.mathfinance.convertible bond Please read update at http:://www.cn 422 .CONVERTIBLE BOND PRICING MODEL A simple spreadsheet to price convertible bond based on Espen Gaarder Haage's binomial tree model which was originally developed by Goldman-Sachs.com/Mktsoftware/excelCB.

mathfinance. speed up computer.matlab Please read update at http:://www.columbia. have fun.html wiki(matlab) Tags .cn 423 .ee.edu/~marios/matlab/matlab_tricks. http://www.matlab tips and tricks Great site for anyone who wants to optimize his matlab file.

American Options via Monte Carlo Simulations Sample code to price american put option with least square Monte Carlo simulation. http://www.mathfinance.com/modules/mydownloads/ visit.cn 424 .quantcode. option Please read update at http:://www.php?cid=11&lid=54 Tags .monte carlo .

cn 425 . The user inputs the bond parameters and an assumed recovery rate for each bond.Risk Neutral Default Probability A spreadsheet that demonstrates risk-neutral default probabilities when pricing bonds with embedded options.com/Mktsoftware/excelRN.yieldcurve.default Please read update at http:://www. We illustrate the Martingale pricing process under certain assumptions.htm wiki(risk neutral) Tags . The accompanying spreadsheet illustrates in simple terms how the riskneutral probabilities are obtained. The spreadsheet computes the default probability.mathfinance. http://www.

A technical description of the methodology appeared in the book "Capital Market Instruments" by Moorad Choudhry et al (FT Prentice Hall 2001).UK Gilt zero-coupon yield curve This spreadsheet demonstrates constructing a zero-coupon yield curve from market gilt yields. http://www. using the basis spline methodology and approach.htm wiki(yield curve) Tags .yield Please read update at http:://www.mathfinance.cn 426 .com/Mktsoftware/excelYC.yieldcurve.

http://en. 6.asian . Risk. option Please read update at http:://www.mathfinance.literateprograms.Asian Option Pricing Here is the MATLAB implementation of the pricing of Asian options from the paper Unified Asian Pricing by Jan Vecer (2002).org/Asian_Option_Pricing_(Matlab) wiki(asian option) Tags . 15. Vol. No. 113-116.cn 427 .

tested under Matlab7.1. run main file DerivativeGui. matlab . change the directory to be the current directory of your matlab.mathfinance.0. gui Please read update at http:://www. Click to download Tags . options include: European option American option Asian option Index future Cash-or-nothing option Asset-or-nothing option Lookback option Chooser option Compound option Exchange option Power option Unzip the EquityDerivGUI file to a directory of your local computer.derivative .m.Matlab-GUI equity derivative calculator This is simple Matlab-GUI files i wrote learning to code an equity derivative calculator.cn 428 .

hiroshima-u.math.cn 429 . The algorithm was reported at MCQMC 2006.random Please read update at http:://www. Matsumoto's Papers on random number generation.sci.Mersenne Twister random number generator SFMT is a new variant of Mersenne Twister (MT) introduced by Mutsuo Saito and Makoto Matsumoto in 2006.mathfinance.jp/~m-mat/MT/SFMT/ index. 128-bit integer) instructions.html wiki(Mersenne Twister) Tags . (see Prof. It supports 32-bit and 64-bit integers. http://www. The article will apper in the proceedings of MCQMC2006.ac. as well as double precision floating point as output.) SFMT is a Linear Feedbacked Shift Register (LFSR) generator that generates a 128-bit pseudorandom integer at one step. SFMT is designed with recent parallelism of modern CPUs. such as multi-stage pipelining and SIMD (e.g.

where U is an orthogonal MxM matrix.N) columns (three.matrix Please read update at http:://www.N) rows of matrix V T affect the product.alglib.Singular value decomposition The singular value decomposition of MxN matrix A is its representation as A = U W V T. only the first min(M.orthogonal NxN matrix. http://www.mathfinance. The matrix W consists mainly of zeros.net/matrixops/general/svd. These columns and rows are called left and right singular vectors. in the example above) of matrix U to obtain matrix A. The diagonal elements of matrix W are non-negative numbers in descending order.php wiki(Singular value decomposition) Tags . all off-diagonal elements are zeros. Similarly. so we only need the first min(M.cn 430 . V .

x) which accepts large numerical arguments http://www.pdf A 'brute' option pricer for the Variance Gamma model (Madan.mathfinance.zip Variance Gamma model in Excel + DLL.axelvogt. cf Schoutens book "Levy Proccess in Finance" VG_Pricer_short(Maple). Carr. volatility Please read update at http:://www. Excel + DLL.de/axalom/ wiki(Normal-inverse Gaussian distribution) Tags . Chang 1998) in Maple VG_small.Normal Inverse Gaussian(NIG) and other stochastical vol model stochastic volatility / other models NIG_tiny_withDLL.nig . and a Maple worksheet with short explanations.cn 431 .zip Normal Inverse Gauss option pricer (with Esscher transform correction). it uses a gamma distribution pdfGamma(a.

writer * Forward start * Lookback. floating strike * Power * Product * Quanto * Quotient * Rainbow * Range * Spread * StrikeReset * TimeSwitch * Vanilla http://www. holder * Extendible.html Tags .cn 432 . gap * Double Binary * Chooser.Online Option Calculator Calculators * Asian. fixed strike * Asian.sitmo. fixed strike * Lookback. option Please read update at http:://www. asset-or-nothing * Binary. simple * Chooser. floating strike * Barrier * Barrier.com/live/OptionVanilla.calculator . double * Binary. cash-or-nothing * Binary. complex * Compound * Correlation * Exchange * Extendible.mathfinance.

option Please read update at http:://www.com/matlabcentral/fileexchange/82 wiki(Spread option) Tags . http://www.mathworks.mathfinance.cn 433 . monte carlo .spread .Monte Carlo Simulation Spread Options an example of code used to price a spread option using Monte Carlo simulations (Haug).

cox ingersoll ross .mysmu.edu/faculty/yujun/research.html http://www.cn 434 . Matlab code for 2-factor CIR in simulations.mathfinance. Matlab code for 2-factor CIR in applications http://www.edu/faculty/yujun/Research/ jackknifecir1foption_sim.Matlab code for 2-factor CIR in simulations Jackknifing Bond Option Prices.mysmu. cir Please read update at http:://www. Programs and data used in the paper: Swap and LIBOR Rates. Matlab code for 1-factor CIR in simulations. Matlab code for 1-factor CIR in applications.m Tags .

and a general solver for financial derivatives (bonds.ncsu.matlab Please read update at http:://www. The library functions include rootfinding and optimization solvers.mathfinance. options). a integrated set of routines for function approximation using polynomial.html Tags . routines for solving discrete and continuous time dynamic programming problems. general solvers for Ordinary Differential Equations (both initial and boundary value problems).edu/~pfackler/compecon/toolbox. http://www4.CompEcon Toolbox for Matlab CompEcon is a set of MATLAB functions for solving a variety of problems in economics and finance. futures. splines and other functional families.cn 435 . a set of numerical integration routines for general functions and for common probability distributions.

http://www.zip wiki(maximum likelihood) Tags .cn 436 .mathfinance.Quasi-maximum likelihood Quasi-maximum likelihood toolbox in matlab.mle Please read update at http:://www.net/files/net/qmle.mathtools.

628/papers/research/garchkit/garchkit.mathfinance.ohio-state.1 now estimates and simulates FIGARCH and GARCH-inMean models.Q)-GARCH(R. Code can be downloaded at http://www-agecon. The conditional distribution may be normal.ag. 1. allows univariate ARMA(P. The current version of GARCHKIT.cn 437 .0b3. student's t or a mixture of two normals.A Matlab Toolbox for Univariate GARCH estimation The primary feature that differentiates GARCHKIT from other GARCH implementations in Matlab is its ability to incorporate covariates into the second moment. Version 1.garch Please read update at http:://www.edu/ people/roberts.S) estimation and simulation using maximum likelihood.html Tags .

weighted covariance matrix Computes a weighted covariance matrix and associated values http://www.covariance Please read update at http:://www.mathfinance.edu/~wfsharpe/mat/mlfn.stanford.htm wiki(Covariance) Tags .cn 438 .

For simplicity.net/options/calculators.Ignoring dividends: Lets you examine graphically how changes in stock price. more at http://www. gamma. theta. rho) and the probability of the option closing in the money.mathfinance. option Please read update at http:://www. time value.black scholes .On-Line Options Pricing Probability Calculators Black-Scholes pricing analysis -. calculator .htm Tags . time to expiration and interest rate affect the option price. the derived "Greeks" (delta. dividends are ignored so you just specify the time to expiration in days rather than entering specific dates.hoadley.cn 439 . volatility. vega.

cn 440 .copula Please read update at http:://www. log-likelihoods and random number generators for numerous basic bivariate copulas. the toolbox comprises CDFs. Normal.html Tags . including the Clayton. Frank. Shortly.m". Simple codes for time-varying Normal. Student's t.Copula toolbox for Matlab An aggregation of Matlab routines that for research on copulas for financial time series . A table of contents is given in "contents. Plackett and symmetrised Joe-Clayton (SJC) copulas.edu/~ap172/code. Gumbel.xls".duke. A few elementary illustration code is given in "copula_example_code.mathfinance. PDFs. Gumbel and SJC copulas are included as well. http://econ.

sourceforge." In more detail.cn 441 .A lightweight applications C++ library for quantitative finance What is Terreneuve? Simply: "A lightweight C++ library for quantitative finance applications. We refer those looking for a more comprehensive (and complex) library to the quantlib project. http://terreneuve.mathfinance. we also intend to use the project as a learning opportunity.-)) is students in quantitative finance and those seeking a gentle introduction to financial computing. Our target audience (aside from our prof . Obviously. Working from this specification we hope to design a useable C++ library for some important quantitative finance applications. Terreneuve is our team name for the project in the Fall 2005 Computing in Finance course at NYU's Courant Institute Masters in Math Finance.net/ Please read update at http:://www.

but it is by no means a complete "book" with all the answers and explanations. Book and Code are at http://finance-old. I have made some C++ subroutines that implements common algoritms in finance. Sometimes it may be easier to follow an exact computer routine. mean variance analysis. there are areas where formulas tend to get involved.no/~bernt/gcc_prog/ index.finance Please read update at http:://www.C++ Financial Algoritms (Financial Numerical Recipes) Quotation In finance.html Tags . These routines are presented together with a good deal of explanations and examples of use. term structure calculations. but even in its incomplete state is should provide a good deal of useful algorithms for people working within the field of finance.mathfinance.cn 442 . Typical examples are option/derivatives pricing.bi. I'm hoping to turn it into a book.

more at http://www.com/ index. We have attempted to provide the simple models.derivative .php?option=com_content&task=view&id=184 Tags . option Please read update at http:://www. as well as those which rely on simulation techniques or advanced modeling.global-derivatives.cn 443 .mathfinance.Global Derivatives Option Pricing Matlab Code a list of various derivatives related Matlab files grouped into categories.

com/gtoml/archive.Archive of Finance Econometrics GAUSS Matlab Code Procedures and necessary declaration files to calculate fitted option prices using Fourier Inversion methods as in Bates (RFS 1996).cameronrookley. This allows for a variety of possible risk neutral diffusions which can accommodate stochastic volatility.html Tags .mathfinance.cn 444 . as well as correlation between the volatility process and underlying asset. more at http://www. jumps.gauss Please read update at http:://www.

edu/faculty/pglasserman/Other/ greeks_code.cn 445 .columbia.greeks .edu/faculty/pglasserman/Other/ grklibor.zip wiki(libor) Tags . paper and code can be downloaded at: http://www.gsb.columbia. Glasserman.pdf http://www.gsb.mathfinance.Fast Greeks by Simulation in Forward Libor Models Fast Greeks by Simulation in Forward Libor Models by Prof. libor Please read update at http:://www.

derivative available to download at Please read update at http:://www. structured. a copy of the c++ code is http://www. for the first time in a book.com/design/ Tags . with the whys and wherefores of the chosen method of solution critically examined. in the context of implementing financial models in C++. Each example is treated in depth. Complete ANSI/ISO-compatible C++ source code is included on a CD for the reader to study and re-use and so develop the skills needed to implement financial models with objectoriented programs and become a working financial engineer. re-usable code via concrete examples.Design Patterns and Derivatives Pricing Design patterns are the cutting-edge paradigm for programming in object-oriented languages. Part of the book is devoted to designing re-usable components that are then put together to build a Monte Carlo pricer for path-dependent exotic options.cn 446 . the singleton pattern and the decorator pattern.mathfinance. Here they are discussed. Assuming only a basic knowledge of C++ and mathematical finance. Advanced topics treated include the factory pattern. the reader is taught how to produce well-designed.markjoshi.

Heston Stochastic Volatility Online Closed form and Monte Carlo simulation for option under Heston Stochastic Volatility.math. volatility Please read update at http:://www.heston . http://www.edu/ms_students/lw429/calculator.cn 447 .mathfinance.nyu.htm wiki(Heston model) Tags .

A Course in Derivative Securities: Introduction to Theory and Computation A textbook for a second course in derivatives at the undergraduate or MBA level or for a first course in a financial engineering program.mathfinance.kerryback. http://www.net/ Tags .cn 448 . The option pricing functions in the book (including worksheet examples and the VBA source code) are available in this Excel workbook.derivative Please read update at http:://www.

andwhether it is paying out what it can afford to in dividends. While they require a large number of inputs. If you have no idea which one will work for you. Big-picture valuation spreadsheets: If you are looking for one spreadsheet to help you in valuing a company.mathfinance. It includes spreadsheets to analyze a project's cashflows and viability.you can download a spreadsheet for the specific model in this section. .. b. Valuation Model Reconciliation: In this section. estimate the right capital expenditures and diagnose the terminal value assumptions to see if they are reasonable. its optimal capital structure and debt type. Estimate the right discount rate to use for your firm. I would recommend one of these 'ginzu' spreadsheets.. 3. You do have to decide whether you want to use a dividend. Corporate finance spreadsheets: These spreadsheets are most useful if you are interested in conventional corporate financial analysis.htm Tags . you will find spreadsheets that reconcile different DCF approaches . 5 . I have categorized the spreadsheets into the following groups: 1. EVA versus Cost of capital and Net Debt versus Gross Debt Approaches.stern. 4 . Valuation Inputs Spreadsheets: In this section. Convert R&D and operating leases into capitalized assets c. I would suggest that you try the "right model" spreadsheet first..FCFE versus Dividend Discount Model.nyu.cn 449 . starting with the risk premium in your cost of equity and concluding with the cost of capital for your firm.Spreadsheet Programs To help you in finding the spreadsheet that you might want. http://pages. they are flexible enough to allow you to value just about any company. FCFE versus FCFF model. a company's risk profile. you will find spreadsheets that allow you to a.stable growth dividend discount.. .excel Please read update at http:://www. 2-stage FCFE etc. 2. Focused valuation spreadsheets: If you have a clear choice in terms of models .. FCFE or FCFF model spreadsheet.edu/~adamodar/New_Home_Page/ spreadsh.

sas . finance Please read update at http:://www.SAS for Financial Engineers SAS for Financial Engineers: 1 – Introduction 2 – Data Management 3 – Financial Modeling(Important PROCs and Advanced PROCs: IML.cn 450 .mathfinance.haas.berkeley. SQL) 4 – Advanced Techniques (SAS Macro and other programming techniques) http://faculty.edu/peliu/computing/ Tags .

cn 451 .haas.MatLab for Financial Engineers MatLab for Financial Engineers: 1-Basics 2–Statistical Analysis 3–Application to Finance I (Monte Carlo Simulations – Statistics Toolbox) 4–Application to Finance II(Portfolio Choice.matlab Please read update at http:://www. Risk Management – Optimum Toolbox) 5--Application to Finance III (Binomial and Trinomial Tree Valuation) http://faculty.edu/peliu/computing/ Tags .mathfinance.berkeley.

mathworks.mathfinance.do?objectId=14508 Tags . matlab Please read update at http:://www. a Binomial Tree and Monte Carlo simulation.com/matlabcentral/fileexchange/ loadFile.Pricing Derivatives Securities using MATLAB A Zip file containing the examples that were used in the MathWorks webinar: "Pricing Derivatives Securities using MATLAB".derivative . Highlights: * Pricing a portfolio of vanilla options using Black-Scholes. * Pricing exotic options using the implied trinomial tree (ITT) method * Hedging using derivatives * Pricing interest rate derivatives using the BDT model http://www.cn 452 .

Parameters estimation of GARCH model Parameters estimation of GARCH model.xls wiki(GARCH) Tags . http://w3.cn 453 .it/passalac/buffer/GARCH.mathfinance.garch Please read update at http:://www.uniroma1.

thomasho. * The site is not responsible for any errors in the models and copyright violation of any models submitted.mathfinance.library Please read update at http:://www. The purpose of the library is to promote usage and better understanding of financial models.cn 454 . * We hope that you can also contribute to the library of financial models by submitting your Excel model spreadsheet in the format consistent with our models. The rules for submission are similar to that of a Journal. That is: o We maintain the right to reject your submission or suggest o revisions of the models o We reserve the copyright of the Excel spreadsheet model.Financial Model Library by Thomas Ho Introduction: * "Financial Model Library" is a library of financial models in an Excel spreadsheet. http://www. * All financial models in this section can be used free of charge and can be distributed.com/mainpages/analysoln.asp Tags .

quantitative trading and quantitative risk management. (2008~2009) Quant analyst.Contact us abiao: PhD candidate in finance. Switzerland (2007 ~ 2008) Quant researcher. Should you are interested into posting your articles on mathfinance. China Skills: VBA. thank you.cn is: #5 site in 'Quantitative Finance' * #7 site in 'Quant' * #5 site in "Math Finance" ** #9 site in "Quant Jobs" ** *by xmarks. please read our paid contributor and guest post policies. As of 24/04/2010. Canada.. part-time job.cn (remove space) for any issue regarding suggestion. China Researcher.cn. complaint. received on average 500~600 unique visitors and 1200+ pageviews per day. one of the few mainly quant oriented blogs. S+/R.com.cn 455 . 2. VBA. 3. ad on this blog. and Germany. freelance. Eview Please leave message here. (2004~2007) Skills: Matlab. follow my twitter or write to abiao @ mathfinance. MathFinance. methods in math finance focusing on derivative pricing. UK. internship. project outsourcing. sharing quant code related site. Several features: 1. France. **by Google. About MathFinance.mathfinance. UK (2009 ~ present) MSc in quantitative finance. UK. China. cooperation. C++ bo: MSc in computational finance.com Quantitative Finance Collector is a Top Site in Quantitative Finance Review This Site Quantitative Finance Collector is a Top Site in Quant Please read update at http:://www. visitors are mostly from US.cn: Blog on Quantitative finance code. etc.

cn 456 .mathfinance.Review This Site Tags .blog Please read update at http:://www.

mathfinance.cn 457 .www.feedbooks.com Food for the mind Please read update at http:://www.

Sign up to vote on this title

UsefulNot useful- Quantitative finance
- Quantitative Finance
- Paul Wilmott - The Best of Wilmott Vol 2
- Applied Quantitative Finance
- FINANCE Quantitative Analysis, Derivatives Modeling, And Trading Strategies
- Structured Finance the Object Oriented Approach
- An Introduction to Quantitative Finance.pdf
- Stochastic Finance
- Advanced Modelling in Finance Using Excel and VBA
- Finance
- Mathematical Finance
- Matlab Code Option
- Monte Carlo Methods in Financial Engineering
- Data Mining-A Heuristic Approach
- 4 Stochastic Calculus for Finance II Continuous-Time Models
- Modern Methods of Valuation
- Financial Engineering
- Solutions Manual - A Primer for the Mathematics of Financial Engineering
- Applied Quantitative Finance 5
- Financial Modeling With Excel and VBA
- Derivatives Modeling Exel Matlab Cpp0131962590 Fm
- Quantitative Trading
- Quantitative Trading Strategies in R Part 1 of 3
- Financial Modelling in Excel
- Quantitative Trading Strategies in R Part 3 of 3
- The Complete Guide to Option Pricing Formulas (2006 2nd Ed. Haug) (1)
- Finance
- - Introduction To Computational Finance And Financial Econometrics
- Hedge Fund Market Wizards by Jack D. Schwager (SaMeep104).pdf
- Building Financial Models With Microsoft Excel
- Quantitative Finance Collector