Options Tool Charalampos G. Papadakis September 2011 Dissertation submitted in partial fulfilment for the degree of Master of Science in Computing For Financial Markets Computing Science and Mathematics University of Stirling Abstract Option is a financial instrument of the derivative market. In particular, it is an agreement between buyers and sellers for a transaction on an asset (e.g. stock) in a specific future day and at a specific pre-agreed price for a non-returnable premium. The main difference with other derivatives is that the buyer of the Option has the right (option) and not the obligation to exercise the derivative, to buy or sell the underlying asset, while the seller has to follow the buyer’s choice. Financial traders are very interested in them for various purposes, including hedging risk and speculating. There are plenty of models and strategies focused on Options. So, it is essential for traders to have a software package that can do automatically the mathematical calculations and display graphics that can help them to take their financial decisions. The Options Tool focuses on the three main parts of Options trading: Options pricing, Options strategies and put call parity theorem. The program uses up-to-date equity Options data from the web page of the Financial Times (www.ft.com), giving the opportunity to the user to choose among various Options. The aim of this project is to combine the most fundamental parts of options trading in a friendly environment for the trader. The Options Tool is a JAVA-based application. The user has to run the application, to choose his inputs and, as a result of simple button clicks, outputs are displayed, according to the choices made. The outputs could be calculations, graphs or tables. The program is separated in three main parts, each one having a different aim, so that the user can go in depth for each Option he is interested in. My achievement is quite near the expectations. The program calculates correctly essential Options models in a friendly and easy to use environment. It can price Options using different models, calculate the Greeks, detect arbitrage and use different strategies for various purposes. Also, the graphics are displayed successfully. . -i- Attestation I understand the nature of plagiarism, and I am aware of the University’s policy on this. I certify that this dissertation reports original work by me during my University project except for the following: The code (Java classes 5.1.10 – 5.1.17) discussed in Section 6.2 about Option Strategies was initially created by Mandhurananda Pahar, in his dissertation for the degree of MSc in Computing for Financial Markets in University of Stirling called ‘Implementation of VaR and Option Strategies’ (2010). The mathematical functions displayed in Chapter 4 and the descriptions of Options Strategies in Section 4.3 were taken from the book Options, Futures and Other Derivates by John C. Hull. Signature Date - ii - Acknowledgements First of all, I would like to thank my supervisor, Dr Mario Kolberg for helping me to complete this project, giving me right directions and organizing my time. Also, I want to give many thanks to Mandhurananda Pahar, a PhD student in the University of Stirling, who offered me his code for Option Strategies. It was a brilliant work of him, and a great point for me to start my project. I want to acknowledge SAAS, the Student Awards Agency of Scotland [1], for giving me a scholarship, big enough to cover my tuition fees. Last but not least, I want to thank my parents for giving me the opportunity to study abroad and having this wonderful experience in Stirling. - iii - Table of Contents Abstract ................................................................................................................................. i Attestation............................................................................................................................. ii Acknowledgements ............................................................................................................. iii Table of Contents ................................................................................................................. iv List of Figures..................................................................................................................... vii 1 Introduction ..................................................................................................................... 1 1.1 Background and Context ......................................................................................... 1 1.1.1 General Information for Options ........................................................................ 1 1.1.2 Option Pricing Models ....................................................................................... 2 1.1.3 The Greeks.......................................................................................................... 2 1.1.4 Options Strategies ............................................................................................... 2 1.1.5 Put Call Parity Theorem ..................................................................................... 3 1.2 Scope and Objectives............................................................................................... 3 1.3 Achievements .......................................................................................................... 4 1.4 Overview of Dissertation ......................................................................................... 4 2 State-of-The-Art .............................................................................................................. 6 2.1 Pre-existing software packages................................................................................ 6 2.1.1 Options-Vue 6 ..................................................................................................... 6 2.1.2 V-Options............................................................................................................ 6 2.1.3 Option-Aid.......................................................................................................... 7 2.1.4 Implementation of VaR and Option Strategies ................................................... 7 2.1.5 O-Trader ............................................................................................................. 7 3 System Requirments ...................................................................................................... 11 3.1 Software/Technologies ............................................................................................ 11 3.1.1 Java ................................................................................................................... 11 3.1.2 Java IDE ........................................................................................................... 11 3.1.3 The R Project for Statistical Computing ........................................................... 11 3.1.4 PDFOne ............................................................................................................ 11 4 Technical Analysis ......................................................................................................... 12 4.1 Pricing Models ........................................................................................................ 12 4.1.1 Black-Sholes-Merton Pricing Model ................................................................. 12 4.1.2 Binomial Pricing Model .................................................................................... 13 4.2 Greeks ...................................................................................................................... 14 4.3 Options Strategies .................................................................................................... 15 - iv - 4.4 Put Call Parity .......................................................................................................... 16 5 Design............................................................................................................................ 17 5.1 Internal Program Structure .................................................................................... 17 5.1.1 OptionsTool.class ............................................................................................. 18 5.1.2 PricingModel.class ........................................................................................... 18 5.1.3 BinomialModel.class ........................................................................................ 19 5.1.4 BSM.class ......................................................................................................... 19 5.1.5 Greeks.class ...................................................................................................... 19 5.1.6 Calendar.class ................................................................................................... 19 5.1.7 Read_PDF_From_URL.class ........................................................................... 19 5.1.8 PutCallParity.class ............................................................................................ 19 5.1.9 DetailsDialog.class ........................................................................................... 20 5.1.10OptionStrategy.class ......................................................................................... 20 5.1.11 DataRead.class.................................................................................................. 20 5.1.12OptionPanel.class ............................................................................................. 20 5.1.13OptionDialog.class ........................................................................................... 20 5.1.14XYSeriesDemo.class ........................................................................................ 20 5.1.15OptionTableDialog.class................................................................................... 20 5.1.16DataTable.class ................................................................................................. 20 5.1.17RoundDecimalPlaces.class ............................................................................... 21 5.2 Data Structure ........................................................................................................ 21 6 Implementation.............................................................................................................. 24 6.1 Pricing Models/Greeks .......................................................................................... 24 6.2 Options Strategies .................................................................................................. 29 6.3 Put Call Parity........................................................................................................ 32 7 Evaluation...................................................................................................................... 34 7.1 Testing ................................................................................................................... 34 7.1.1 Black-Sholes-Merton Pricing Model ................................................................ 34 7.1.2 Binomial Tree Pricing Model ........................................................................... 34 7.1.3 Delta ................................................................................................................. 34 7.1.4 Rho ................................................................................................................... 35 7.1.5 Gamma ............................................................................................................. 35 7.1.6 Vega .................................................................................................................. 35 7.1.7 Theta ................................................................................................................. 36 7.1.8 Put Call Parity................................................................................................... 37 7.1.9 Possible Crash Problems .................................................................................. 38 7.2 Feedback ................................................................................................................ 38 -v- 8 Conclusion ..................................................................................................................... 40 8.1 Summary ................................................................................................................ 40 8.2 Evaluation .............................................................................................................. 40 8.3 Future Work ........................................................................................................... 41 References .......................................................................................................................... 43 Appendix 1 – User guide .................................................................................................... 45 Appendix 2 – Installation guide.......................................................................................... 46 - vi - List of Figures Figure 1 Options Aid Fair Value/Greeks [14] ........................................................................... 8 Figure 2 Options Vue 6 Graphic Analysis [15]......................................................................... 8 Figure 3 VOptions 3D Graph [16] ............................................................................................ 9 Figure 4 OTrader Options Pricing/Greeks Calculator [17] ....................................................... 9 Figure 5 Options Strategies by Mandhurananda Pahar (University of Stirling) [18] ............. 10 Figure 6 Main Program Structure ........................................................................................... 17 Figure 7 Pricing Models Structure .......................................................................................... 17 Figure 8 Option Strategies Structure....................................................................................... 18 Figure 9 Put Call Parity Structure .......................................................................................... 18 Figure 10 BlueJ Options Tool Class Structure ........................................................................ 21 Figure 11 www.ft.com Data Market ....................................................................................... 22 Figure 12 Data Structure ........................................................................................................ 23 Figure 13 Options Tool Pricing Models ................................................................................. 25 Figure 14 Options Tool Binomial Tree ................................................................................... 26 Figure 15 Options Tool Calendar............................................................................................ 27 Figure 16 Options Tool Strategies .......................................................................................... 29 Figure 17 Options Tool Strategy Graph .................................................................................. 30 Figure 18 Options Tool Strategies Table................................................................................. 31 Figure 19Options Tool Intrinsic and Time Value .................................................................... 31 Figure 20 Options Tool Put Call Parity Panel ......................................................................... 32 Figure 21 Options Tool Arbitrage Details............................................................................... 33 Figure 22 Options Tool Information ....................................................................................... 33 - vii - 1 Introduction The Options Tool is a Java-based application that focuses on financial Option trading. In this chapter there are briefly discussed the general information for Options and their models, strategies and theorems. 1.1 Background and Context Options are widely used in financial markets, especially by traders. Their history started in the late 17th century by a small group of traders. 1.1.1 General Information for Options Options are securities traded on the financial markets. They are part of securities called derivates. That’s because they derive their value from the underlying asset they are based on. The underlying asset could be a financial instrument like stock, currency, commodity, index or other security like Future. Options include a specific price at which the underlying asset can be bought or sold in the future and a specific time that it has to be exercised. This price is called strike price, while the expiry time is called time to maturity. The buyer has to pay a nonreturnable premium to own the Option. Usually, there is a clearing house between the buyer and the seller to limit the default risk. There are many different kinds of Options. Initially, the main difference is between Call and Put Options. Holding a Call Option gives the right to the holder to buy the underlying asset. On the other hand, holding a Put Option gives the right to the holder to sell the asset. The holder is called the part that buys the Option, while the writer is the part that sells the Option. Another fundamental separation of Options is between European and American Options. There is no geographical significance. The main difference is that American Options can be exercised at any time until the maturity time, while European Options can be exercised only at the maturity time. Options are extremely versatile. Traders use them for various purposes. These purposes could be either for hedging risk or speculating. Options can be used to hedge the total risk of their underlying asset. Using various strategy forms, the trader can achieve a smaller loss, in case he has to confront the worst scenario. Speculating with options is a kind of betting. Speculator decide on future prices levels, judging from past prices fluctuations and other related available information. Betting on a specific movement of the price can lead to profit. For example, if a financial player has the feeling -1- that a specific stock price will go higher, he can buy call options of that stock with the lower strike price, so as to speculate from the price changes. If the expectation comes true, the holder can buy an asset at a lower price than the current and then sell it at the current price. Unfortunately for the speculators, options are very risky, when they are traded alone, and as a result, they are usually traded with their underlying asset. 1.1.2 Option Pricing Models There are plenty of models trying to evaluate the price of Options. Among them, the two most known and used are the Binomial Model and the Black-Sholes-Merton Model (BSM). The Binomial Model was first presented by Cox, Ross and Rubinstein in 1979. It is computational slower than the BSM, but it gives more accurate results [2]. Except that, the main comparative advantage of the Binomial Model is that it can be used to price American Options, while BSM is only for European Options. That’s because it can price the Options in different time steps. As a result, American Options, which can be exercised before their expiry time, can be priced only with the Binomial Model. The Black-Sholes-Merton Model (BSM) was introduced in 1973 by F. Black and M. Sholes and then extended in the same year by R. Merton. According to that model the prices change continuously, rather than discretely, as it is assumed in the Binomial Model. 1.1.3 The Greeks These are the sensitivity factors of the Options and are called Greeks because they are represented with Greek letters: Delta (δ): option’s sensitivity to stock value. Theta (θ): option’s sensitivity to time to maturity. Gamma (γ): option’s delta sensitivity to stock value. Vega (ν): option’s sensitivity to volatility. Rho (ρ): option’s sensitivity to interest rate. They are indexes that represent the size of change in Options prices for every small change of the factors it is depended on. 1.1.4 Options Strategies There are various strategies either for hedging risk or speculating. These strategies are combinations of Option and Stock trades. For example, it is possible to buy a stock and sell a call or -2- buy both call and put of the same underlying stock. The profit or loss from each strategy depends on how the stock’s price will move in the future. 1.1.5 Put Call Parity Theorem The Put Call Parity Theorem is based on the law of one price [3].This law assumes that all sellers will massively search for the higher price to sell their asset, while all buyers will flock for the lowest price. It shows the relationship between the call and the put Option of a specific asset, with same strike price and expiry date. The relationship is the following: c Ke rT p S 0 According to the theorem, if the equation does not hold, there are arbitrage opportunities. The arbitrageur can sell the overpriced assets and buy the underpriced ones. The Put Call Parity Theorem is used only for European Options. 1.2 Scope and Objectives The aim of the Options Tool is the creation of a complete tool for traders focused on Option securities. My aim was to add the main Option instruments that a trader could use in one program. This combination can lead to a really useful tool for the user, with no need to switch among different programs. It is important to highlight that the user must be a financial person. The program is focused on them, as they are specialists in trading. As a result, this program may be unfriendly to people from other backgrounds not giving so detailed information about each usage. Moreover, the program tries to be friendly to people with small experience in Finance, so as not to be ideal only for experts. In addition, the user can be a student of Finance. This software may have an educational purpose as well. The models, the functions and the theorems that are being used are similar with those taught in the University. So, students have the opportunity to calculate functions that otherwise they have to spend significant time to figure out. Also, it can be used as for verification purposes. The data will be taken from the Financial Times website. The Financial Times give every working day the data in a PDF format, separately for each day. The program is able to update the data, according to the user’s choice. Moreover, the application has separate parts, friendly for the user to switch among. The calculations should be accurate, because a small mistake in prices, could lead to big loss, making the software useless. -3- There are similar programs already for Options, but they are not free at this level. The amount of money that someone has to pay for using them is significant. Many of them belong to big organizations and banks, something that makes them difficult to approach for the average user. On the web, there are some free programs, but they just price Options with no connection to any data, so the user has to fill all the inputs manually, in a poor design. 1.3 Achievements The Options Tool combines the essential models of Option derivatives. As a result this program is separated in three main parts: Pricing Options Options Strategies Put Call Parity Theorem Each part focuses on different applications for the selected Option. So, the user can select a specific Option and switch among the three panels, in order to take the available outputs. The first panel, called Pricing Options, gives information about the prices of Options. It also calculates sensitivity factors, ‘the Greeks’, for the selected Option. In the second panel the trader can choose among the most important Option Strategies and take back tables and graphics for the selected strategy. In the third panel arbitrage opportunities are detected. The program checks if there are mispriced assets and gives details about how the user has to act to receive the profit. There is financial information, in each part, helping the user to understand the process. Once again, the program is focused on financial people and as a result the given information is not so detailed, something that may make the program hard to use from people outside the financial sector. But, this was not in the purposes of this project. Except for the financial information, there is also guidance in the way the user has to choose the inputs, so as to avoid incompatible inputs. 1.4 Overview of Dissertation The rest of the dissertation focuses on the software development. The next chapter called State-of-The-Art will present the work that had already been done by other developers in Options. Then, in Chapter 3, the technologies used will be discussed, followed by the technical analysis in Chapter 4. In Chapter 5, there will be an internal presentation of the structure of this program. In Chapter 6, there will be details on how this program was implemented. This -4- section will be separated in three parts, each one for every panel of my program. In Chapter 7, the program will be evaluated by testing it to see how accurate the outputs are and then giving it to the financial people to judge it and give their feedback. In Chapter 8, there will be the conclusion of this project, including self-evaluation and future work. Finally, there will be references and a guide for how to install and use this software. -5- 2 State-of-The-Art As Options are an old issue in financial markets, very interesting and significant work has been done on them. That shows how important are computer programs for Option trading purposes. Experience plays a fundamental role in trading, but knowing the right thing at the right time can bring great benefits. Pre-existing software packages 2.1 Judging by the already available software packages, one important conclusion can be made. Most of these programs are American and they focus on the American Options. There are not any powerful programs for European Options. As a result, I did not find anything containing the Put Call Parity Theorem. Below there is a brief presentation of the most important programs: 2.1.1 Options-Vue 6 Options-Vue [4] integrates with real-time quotes, charting and also gives the opportunity to build portfolios. It was developed by Option traders. It collaborates with Track Data Corporation to provide users with reliable up-to-date data. This software package contains OpScan which is a real-time scanning service for detecting trading opportunities and Back-Trader a back-testing tool with historical data back to 2001. The program was voted 6 times best Options Analysis software. 2.1.2 V-Options Visual Options Analyser (V-Options [5]) is a ‘powerful analysis tool’ for developing, testing and using Options Strategies. It also lets the user to built portfolios and manages them. It can display 3D graphics in a great style. It is supposed to be ideal for both new and experienced traders. It is free only for TD Ameritrade clients. The data is downloaded from TD Ameritrade and Chicago Board Options Exchange. For pricing Options it provides three models: Black-Sholes-Merton, Binomial American and Binomial European model. It also allows you to export charts and data to Microsoft Excel. 2.1.3 Option-Aid Option-Aid [6] is an indispensable computer program for Options Trading. It includes five main parts, in five separate panels. The first part is for calculating the fair value of Options so as to check if Options are mispriced. It uses Black-Sholes and Barone-Adesi Whaley models. -6- The Greeks are also calculated in the same panel. Then, the next panels are for calculating the stock’s volatility, the probabilities of reaching targets, the expected return of each Option position and finally the last panel is for the main Option Strategies. One interesting application of Option-Aid is the use of data mining methods to predict future prices and indexes. Finally, the program provides the user with a lot of ‘Help’ buttons. 2.1.4 Implementation of VaR and Option Strategies A very interesting work for Option strategies was done by Mandhurananda Pahar in 2010 in University of Stirling [7] . This program displays in very nice graphs and tables the most important strategies. Also, it teaches the user how to use strategies. The Data is taken from the ‘Financial Times’ website and it is about UK equity Options. The main aim of this project is the calculation of Value at Risk, but it has as extra benefit for the user the Option Strategies. 2.1.5 O-Trader Finally, there are also some free calculators (e.g. OTrader[8]) for Options pricing and the Greeks, easy to use but without any special design, graphs or connection with any data source. This means that the user has to fill every input manually. Anyone can download it for free. All these programs are running on Windows, but there are new special software packages made for Macintosh users (e.g. Pro Analyst [9]). Below there are some indicative prices for software packages for Options. Prices vary from zero to near $1000. OptionsVue6 – Standard Edition $995[10] Option-Aid - $395 [11] VOptions - $69,95 + $0,99 optional for iPhone application [12] OTrader - $0 [13] In the next pages of this Section there are some figures from the above software packages: -7- Figure 1 Options Aid Fair Value/Greeks [14] Figure 2 Options Vue 6 Graphic Analysis [15] -8- Figure 3 VOptions 3D Graph [16] Figure 4 OTrader Options Pricing/Greeks Calculator [17] -9- Figure 5 Options Strategies by Mandhurananda Pahar (University of Stirling) [18] Judging by the amount of programs made for Options trading, it is obvious to see how essential it is to have a helpful computer application that is focused on Options. From all the available information, we can say that what is missing is a complete application that contains most of the Options trading models, strategies and theorems focused more on European Options, rather than American. I have not found any program containing the Put Call Parity Theorem, which is only for European Options. The Option Strategies by M. Pahar is a program for UK Options, but it contains only a part of the Options background. Also, only few programs contain the Binomial Tree graph. Moreover, another missing point is an application that will be friendlier to the user, without containing hundreds of numbers, and so as someone to use has not to be an expert of Options trading. Most of these programs are really complicated and as a result really difficult for users, both for those out of the financial sector and those with short financial experience, to understand and handle them. They display plenty of numbers and indexes, so only an experienced person can handle them, drawing his own conclusions. - 10 - 3 System Requirements 3.1 Software/Technologies Various software packages and technologies were used for the creation of this program. Below there is brief information about them. 3.1.1 Java Java is one of the most popular computer languages. It is an object-oriented programming language, ideal for both applications and applet, because it has high level portability, which means that it can be run on any supported platform, regardless of the computer architecture. It is now owned by Oracle Corporation [19] [20]. 3.1.2 Java IDE An integrated Java development environment is required to run the Java application. Eclipse and BlueJ are two of the most popular. Eclipse [21] is more professional, with more abilities but it is harder to configure. BlueJ [22] is easier to handle, because it focuses more on educational purposes. It is very friendly for the user and displays the internal structure of a software package more clearly than any other development environment, showing all classes and the connections among them. It is ideal for new students in programming. It was developed at the University of Sydney and Monash University in Australia. They are both free. 3.1.3 The R Project for Statistical Computing ‘R is a programming language and software environment for statistical computing and graphics’.[23] R objects can be manipulated from other languages like Java in various ways. It supplies a package called ‘fOptions’ that provides the basics of Option Valuation. It was developed at Bell Laboratories. 3.1.4 PDFOne PDFOne is a powerful is PDF component for Java developers. It allows reading and writing PDF files from Java. [24] Also, it enables searching for PDF files in the web and downloading them to the user’s folder system. - 11 - 4 Technical Analysis Option Tool focuses on Options trading. It uses up-to-date data from the web page of the Financial Times, www.ft.com, giving the user extra information for the specific Options, either calculating widely used models and functions or displaying graphs. The main parts applied by the Options Tool are the following: Pricing Models 4.1 Estimation of Options prices is important for traders. Traders want to see how the value of the Option changes, in response to the conditions changes, so as to check if the given prices are mispriced or not. This project has some inputs that are editable, so that the trader can choose the values that he is interested in. The Binomial European, the Binomial American and the Black-Scholl-Merton are the most popular pricing models for Options. These models use quantitative methods trying to predict the Option’s value. For all the functions of this project the following symbols are used: c = call price p = put price S 0 = spot price K = strike price σ = stock volatility r = interest rate q = dividend yield T = time to maturity N ( d1, 2 ) = cumulative probability distribution for a standardized normal distribution N ' (d1, 2 ) = probability density function for a normal distribution 4.1.1 Black-Sholes-Merton Pricing Model Below there are the mathematical functions of BSM, for both call (c) and put (p) Options. - 12 - c S 0 N (d1 ) Ke rT N (d 2 ) p Ke rT N (d 2 ) S 0 N (d 2 ) d1 where d2 4.1.2 ln( S 0 / K ) (r 2 / 2)T T ln( S 0 / K ) (r 2 / 2)T T d1 T Binomial Pricing Model According to this model there is p possibility for the stock price to go up for u and (1-p) possibility the price to go down for d. The Option price f will be affected by the changes in stock’s price. For a call Option: f u max( 0, S 0 u K ) p S 0u S0 f 1 p For a put Option: S0d f d max( 0, S 0 d K ) f u max( 0, K S 0 u ) f u max( 0, K S 0 d ) The formula to find the probability is the following: p e rT d ud So, the expected stock price will be: e rT d E ( S T ) pS 0 u (1 p) S 0 d pS 0 (u d ) S 0 d S 0 (u d ) S 0 d S 0 e rT ud While the expected Option price will be: f [ pf u (1 p) f d ]e rT - 13 - Greeks 4.2 Greeks are factors that show how the movement of each input variable of pricing models, affects the price of the Option. Their values present the Options price sensitivity for each change. The underling mathematical functions are different between call and put Options: Delta (δ): option’s sensitivity to stock value. Call: δ = e qT N (d1 ) Put: δ = e qT [ N (d1 ) 1] It usually takes values between -1 and 0 for a put Option and between 0 and 1 for a call. When Delta is 0.6089 it means that if the stock price goes up by 1, the Option price will tend to go up by 0.6089x1=0.6098. Theta (θ): option’s sensitivity to time to maturity. Call: θ = Put: θ = S 0 N ' (d1 )e qT 2 T S 0 N ' (d1 )e qT 2 T qS 0 N (d1 )e qT rKe rT N (d 2 ) qS 0 N (d1 )e qT rKe rT N (d 2 ) Theta shows the Option’s value per year, the time decay, that is why it is almost always negative [25]. For example, if Theta is -404.39 it means that the Option is losing 404.39 of its value each year. If you divide it with 365, you can find the loss per day. Gamma (γ): option’s delta sensitivity to stock value. Call: γ = Put: γ = N ' ( d 1 )e qT S 0 T N ' ( d 1 )e qT S 0 T It shows how the Option’s Delta factor is moving to the stock price changes. It is always positive for long Options. If Gamma is 0.000089 it means that if the stock price goes up for 1, the Option’s Delta will tends to go up by 0.000089x1=0.000089. Vega (ν): option’s sensitivity to volatility. Call: ν = S 0 T N ' (d1 )e qT - 14 - Put: ν = S 0 T N ' (d1 )e qT It represents the Option’s price movement to the stock’s volatility changes. If Vega is 547.19, it means that if volatility goes up for 0.1, Option’s price will go up for 547.19x0.1=54.719. Rho (ρ): option’s sensitivity to the interest rate. Call: ρ = KTe rT N (d 2 ) Put: ρ = KTe rT N (d 2 ) Usually, the interest rate plays the smallest role in the Option’s price. If Rho is 380.40, it means that if the interest rate goes up for 1%, the Option’s price will be 380.40x0.01=3.804 higher. 4.3 Options Strategies In the second panel of Options Tool, the most popular Option Strategies are available. The user can choose among various different strategies. The output of this panel can be either a graph or a table. The strategies are divided in three groups: 1) Option Spreads: Bull Call Spread: buy call and sell put at a higher strike price and same expiry time. Bull Put Spread: buy put and sell call at higher strike price and same expiry time. Bear Call Spread: buy call and sell put at lower strike price and same expiry time. Bear Put Spread: buy put and sell call at lower strike price and same expiry time. 2) Option for Hedging: Covered Call: buy stock and sell its call. Protective Put: buy stock and sell its put. Collar: buy put at a lower strike price than the stock’s spot price and sell a call at higher price than the stock’s spot price. 3) Other Strategies: - 15 - Long Straddle: buy both call and put at same strike price and time to maturity. Short Straddle: sell both call and put at same strike price and time to maturity. Long Strip: buy one call and two puts at same strike price and time to maturity. Short Strip: sell one call and two puts at same strike price and time to maturity. Long Strap: buy two calls and one put at same strike price and time to maturity. Short Strap: sell two calls and one put at same strike price and time to maturity. Long Strangle: buy call at higher strike price and put at lower strike price and same time to maturity. Short Strangle: sell call at higher strike price and put at lower strike price and same time to maturity. All this strategies have meaning when they are applied on the same stock. In Options market long means buy, while short means sell. Put Call Parity 4.4 . The underlying mathematical function of this theorem is the following: c Ke rT p S 0 We can imagine the two parts of the equation like two portfolios [26] . If one of them is mispriced, there are profit opportunities. The first portfolio contains the call Option and money that you can even borrow or invest, while the second portfolio contains the put Option and the stock. If the equation does not hold, there is an arbitrage opportunity. The arbitrageur buys the cheaper portfolio and sells the expensive one. To be more specific, there are two possibilities: If c Ke rT p S 0 : the left side of the equation is mispriced. The arbitrageur has to buy the assets of the left side. So, the arbitrageur buys the call Option and invests in money. Also, he should sell the assets of the right side which are overpriced. So, the put Option and the stock are sold. The difference in price between the assets that are bought and the assets that are sold ensures a certain profit. If c Ke rT p S 0 : the right side of the equation is mispriced. Now the arbitrageur has to do opposite actions. Buy the put Option and the Stock, and sell the call Option and borrow money. - 16 - 5 Design 5.1 Internal Program Structure The Options Tool is a Java application that contains 17 classes totally: OptionsTool PricingModel PutCallParity OptionsStrategy Figure 6 Main Program Structure BinomialModel DataRead PricingModel RoundDecimalPlaces Greeks BSM Calendar InfoDialog Read_PDF_From_URL Figure 7 Pricing Models Structure - 17 - OptionStrategy OptionPanel XYSeriesDemo DataRead OptionDialog RoundDecimalPlaces DataTable OptionTableDialog Figure 8 Option Strategies Structure PutCallParity DataRead DetailsDialog InfoDialog RoundDecimalPlaces Figure 9 Put Call Parity Structure 5.1.1 OptionsTool.class This is the main class of the project. The application can be run from this class. It uses three classes, each one for each panel of the application: PricingModel.class, OptionStrategy.class and PutCallParity.class. These classes are set together with a Java Tabbed Panel. 5.1.2 PricingModel.class This class deals with the pricing models and the Greeks, contained in the first panel of the project. It is connected with the BinomialModel.class , the BSM.class and the Greeks.class in order to calculate Binomial Model, Black-Sholes-Merton Model and the Greeks respectively. - 18 - 5.1.3 BinomialModel.class This class aims to calculate the Binomial Model functions. This class calls R software package, using Rserve, and implements the Binomial Tree graphic. It is based on PlotDemo.java file [27]. 5.1.4 BSM.class In this class the Black-Sholes-Merton Model is calculated. This class contains two methods: one that calculates the BSM formula and one that calculates the probability distribution for a standardized normal distribution function that is used by BSM formula. The normal distribution implementation was taken from [28]. 5.1.5 Greeks.class This class aims to calculate five different sensitivity factors of Options price. There are seven methods in this class. The first five methods implement the Greeks: Theta, Gamma, Delta, Vega and Rho, while the two last methods are for cumulative normal distribution and probability density function for a normal distribution. Math Java library was used for the implementation of this model [29]. 5.1.6 Calendar.class This class contains the calendar Object which is displayed in a pop-up dialogue window, when the user wants to download data from the web. It was taken from [30] and modified for the purposes of this project. 5.1.7 Read_PDF_From_URL.class This class connects the program with the ‘Financial Times’ web site, searching for the available PDF data file. It is part of PDFOne library examples [31]. It was modified to fit the program. It uses lot of exceptions (try, catch) in order to access the web PDF file. 5.1.8 PutCallParity.class The third panel of the software package is built on this class. It uses DetailsDialog.class to display a pop-up window with more details for the arbitrage and infoDialog.class to give some information to the user for the theorem in a pop-up dialogue window. - 19 - 5.1.9 DetailsDialog.class The details of Put Call Parity arbitrage are displayed in a pop-up Java Dialog, which is built in this class. This class learns from PutCallParity.class if there is an arbitrage opportunity, and then suggests the user what exactly to do to gain the profit and also informs him how much the profit will be. 5.1.10 OptionStrategy.class This class concerns for Option Strategies. It uses four classes. OptionPanel.class, OptionTableDialog.class, DataRead.class and XYSeriesDemo.class. It is the class on which the second panel of the Options Tool is built. 5.1.11 DataRead.class This is the class that reads the text file ‘data.txt’ and imports the entire program with the available data. All the classes that use data are connected with this class: PricingModel.class, OptionStrategy.class and PutCallParity.class. 5.1.12 OptionPanel.class All the data of the chosen stock in the Option Strategies panel is contained in this class. 5.1.13 OptionDialog.class This class extends Java Dialog and gives information about the intrinsic value and the time value of the selected Option. 5.1.14 XYSeriesDemo.class This class is part of JFreeChart project. It draws the graph for the selected Option Strategy. 5.1.15 OptionTableDialog.class This class fills the table for Option Strategies. It uses DataTable.class and RoundDecimalPlaces.class. 5.1.16 DataTable.class This class extends Java Panel and creates the table output of Option Strategies. - 20 - 5.1.17 RoundDecimalPlaces.class All double numbers in this program are rounded off with the use of this class. All the classes between 5.1.10 – 5.1.17 were taken from [32] and then modified for the purposes of this project. Figure 10 below presents the internal structure of the program using BlueJ: Figure 10 BlueJ Options Tool Class Structure 5.2 Data Structure The data is taken from the ‘Financial Times’ web page for Data Market. Figure 11 below shows in which place in the market data section of the www.ft.com the data can be downloaded [33]: - 21 - Figure 11 www.ft.com Data Market The URL is the following: http://markets.ft.com/RESEARCH/markets/DataArchiveFetchReport?Category=EQ&Type =UKOPT&Date=08/17/2011 The way the URL is formed gives the opportunity with just putting a string variable in date’s place to have straight access to each day’s file. Using Read_PDF_From_URL.class the program downloads the PDF file with the data and stores it to the program’s folder. The data is downloaded in the folder in a file named ‘download.pdf’. Then the user has to open the PDF file and copy the text of it. In the same folder there is another file named ‘data.txt’. This is a text file. It should be opened and then the copied text from the PDF file should be pasted in the text file. The program reads the data from the ‘data.txt’ file. Figure 12 below presents this process: - 22 - www.ft.com PDF file ‘download.pdf’ Text file ‘data.txt’ Option Tools Folder Option Tools Folder Options Tool Options Tool ReadData.java Software package Figure 12 Data Structure - 23 - 6 Implementation The implementation of this software package had as a starting point the already existing program for Options strategies that was developed by Mandhurananda Pahar in University of Stirling. The initial program was just a part in a software package, which has the form of an applet embedded in a web page. It was a Java Dialog class that was invoked with a simple button click. The aim of that software package was the implementation of Value at Risk and Option Strategies. So, I had to find the parts I was interested in and to run them as a separate applet. Then, the applet was converted to an application, as I could not find any feasible way to connect the applet with R-project and the web, due to security reasons. Applets have the advantage that they can be embedded in a web page and as a result the program can be approached world-widely. On the other hand, applets have a lot of restrictions. They cannot communicate with the internet or access local files in the users file system. So, the direct download of the data file and the use of R-project were difficult to achieve without the conversion from applet to application. It could be achieved with the use of a digital signature, but as there was not any fundamental reason for this program to be embedded on a web page, and that it would be time consuming to do that, it was preferred the applet to be converted to an application. The program contains three major panels, each one for different purposes. The user can easily switch among of them as they are settled together using a Java Tabbed Panel. 6.1 Pricing Models/Greeks When the user starts the program, the Pricing Models panel is displayed on the screen. The program welcomes the user. Then, the user can choose among the three models and between call and put Option. After that, a specific Option has to be selected. The program understands which Option is selected, reads the data and informs the user with the spot and strike prices of the selected Option. Always there are two available strike prices. The spot and strike prices are updated automatically, when the selected Option is changed. In addition, inputs as stock’s volatility, expiry time, interest rate, steps and dividend yield have to be filled by the user. There a lot of restrictions for these inputs, as they must be only positive double numbers or integers. After the successful filling of the inputs, the Option can be priced with a simple button click. The Greeks are also calculated in the Options Pricing model panel with the same button that prices the Options. The implementation of these factors in Java code was made using the Java Math library. - 24 - Figure 13 Options Tool Pricing Models If the user chooses the Binomial Pricing Method, he can also see the Binomial Tree in a new frame. This frame was created using the R Statistics Software. A lot of research was done during the implementation period on how to call the R functions from Java. R has its own functionality, quite different from the Java code. R offers a special package for Options, called fOptions [34]. The R function that builds the Binomial Tree can be displayed in only five lines. This is the reason why R is so useful and so widely known. Below there are the R functions that generate the Binomial Tree. They were taken from [35]: CRRTree = BinomialTreeOption(TypeFlag = "pa", S = 50, X = 50, Time = 0.4167, r = 0.1,b=0.1,sigma=0.4,n = 5) BinomialTreePlot(CRRTree, dy = 1, cex = 0.8, ylim = c(-6, 7), xlab = "n", ylab = "Option Value") title(main = "Option Tree") - 25 - Figure 14 Options Tool Binomial Tree There are a lot of ways to call R from Java: Rserve ‘Rserve is TCP/IP server that allows other programs to use R facilities from various languages like Java’. [36] The connection is initiated with just this statement: Rconnection c = new Rconnection(); rJava ‘rJava is another way to connect Java with R. ‘It is a simple r to java interface. It provides a low-level bridge between Java and R via JNI’. [37] RCaller RCaller is the newest way to connect Java with R. ‘It runs RScript executable file using Java Runtime and Process classes, converting R objects to Java string or string arrays’ [38]. There are some examples on the internet on how to use them for calling R functions or graphs, but are not so helpful for the inexperienced people in programming. For RServe there is a very - 26 - helpful demo, called PlotDemos.java [39], which shows how to invoke R graphics from Java. Only the plotting R code has to be changed in order to meet the purposes of the project and then to figure out how to insert Java variables in this code. The last button of this panel gives the user the ability to communicate with the ‘financial times’ web page, to search for available data for the selected day and finally to download this file in a PDF format. Clicking on the ‘Download data’ button, a calendar is displayed on the screen, from which the user can select the day he is interested in, which is usually the most recent date. Figure 15 Options Tool Calendar The user can select the day he is interested in, by just clicking on it. After clicking on the ‘OK’ button the program informs the user if there is available data from the web for the selected date. The program has connection with the data source and the data file is downloaded and saved into the program’s folder. After that, the user has to convert the PDF data file in simple text file manually with the copy-paste method. That is a matter of a 30 seconds process and as the data is updated in the web page once per day, except weekends and holidays, this operation has to be done just one time during a working day. The next step to this application would normally be to make the program read the data from the PDF file. But, due to the complexity of this step, the fact that the data was already red suc- - 27 - cessfully for every selected date from the text file and the knowledge that the data was updated in the web just once per day, it was preferred not to focus on it. What I tried would be a good solution to this problem, but unfortunately it did not have the expected results. A lot of software packages ideal for PDF reading and writing are available on the internet and also some of them give the ability to convert the PDF to simple text. So, if I could do it and the way the text file was created it was similar to how a manually copy-paste text file is created by a PDF source. But, unfortunately, the output was not the expected one. There were lot of differences between the created text files and the already used one with the simple copy-paste method. As a result, the DataRead.class should be changed. The most powerful from the PDF libraries I tried where the following: PDFBox [40] iText [41] Both are Java PDF libraries that allow the developer to create new PDF files, manipulate existing ones and read from them. PDFBox provides a great demo that reads and copies a PDF file from the user’s program folder and then it pastes the text to a simple text file inside the same folder. The demo is a Java class named ‘PDFText’ [42]. I have included this class to the Options Tool folder in case of a future improvement of this program. - 28 - 6.2 Options Strategies The second panel of Options Tool focuses on Option Strategies. This was an already existing part as it was referenced in the previous chapters. The main changes were on graphics and form. It was converted from applet to application. In this panel, the user is welcomed with a short description of what he can do. Then, one of the strategies discussed in Section 4.3 can be chosen. Figure 16 Options Tool Strategies After choosing a specific strategy, the user has to decide between seeing in a graph or a table the possible profit or loss of the selected strategy. The profit is depended on the stock’s price movement. If the trader holds a call Option or has written a put Option, the profit is bigger when stock’s price is increasing. On the other hand, if the trader holds a put Option and has written a call Option the profit is bigger when the stock’s price is decreasing. If the stock price is bigger than the strike price the call price will be exercised by the holder while - 29 - the put will not. The holder is the one who has the right and the other part has to follow his decision. For example, if the user chooses the Long Straddle the following graph is displayed in the screen. In the Long Straddle Strategy the trader buys both call and put Options at the same strike price. If the ‘View Graph Details’ button is clicked, the following graph is displayed on the screen . Figure 17 Options Tool Strategy Graph The red line shows how the profit on the call position will move in response of the possible future stock’s price changes, while the blue line does the same for the put position. The green line, the net profit, is generated by summing the profits on the long call position and the long put position at every possible change of the stock’s price. If the ‘View Table Details’ button is clicked the result is a table analysing every point of the profit/loss diagram for every possible future stock price: - 30 - Figure 18 Options Tool Strategies Table The program, also, gives the opportunity to see both the intrinsic and time value. The intrinsic value is for Options is difference between the spot and the strike price [43]: Call: max(0, S 0 K ) Put: max(0, K S 0 ) The time value is the difference between the Option’s price and the intrinsic value [44]. Figure 19Options Tool Intrinsic and Time Value - 31 - 6.3 Put Call Parity Figure 20 Options Tool Put Call Parity Panel This is the last panel of the program. The program here welcomes the user as well. There is some financial information available for this parity theorem. Here again a particular Option and its strike price have to be chosen. The user has to fill manually only the time to maturity and the interest rate variables. Clicking on the Button “Calculate Parity”, the program gives a brief one line outcome, informing if there is an arbitrage opportunity or not. The program understands which side of the parity is mispriced and which is overpriced. If the user wants more information about how to take advantage of the situation the program, with a simple button click on “Details” button, displays a pop-up window which suggests how the trader has to act and which will be the total profit from the arbitrage. The Put Call Parity panel class informs the Details pop-up window class what kind of arbitrage could be achieved and also transfers the inputs. Then, the Details class does the calculations successfully giving exact directions to the user about how to act and determines the profit from these actions. - 32 - Figure 21 Options Tool Arbitrage Details The program assumes that the arbitrageur wants to take advantage of the arbitrage imminent and acts according to that. It could be possible to calculate the parity, so as the trader has zero imminent cash flow and take the profit at the expiry time of the Option. The outcome is the same in both cases. There is also available financial information, which is displayed in a pop-up dialogue: Figure 22 Options Tool Information - 33 - 7 Evaluation Testing 7.1 In this Section we will test if the outputs of this project are correctly calculated. A very small difference in prices should be expected due to the round off of the double numbers. 7.1.1 Black-Sholes-Merton Pricing Model First, we will see the Black-Sholes-Merton pricing model. The reader can verify the output from Figure 13. Also, the functions that are used below were described in Chapter 4. d1 ln( 2850 / 2800) (0.05 0.3 2 / 2)0.25 0.3 0.25 0.2763 d 2 0.2763 0.3 0.25 0.1263 Then, the cumulative normal distribution should be calculated N (d1) = N(0.2763) = 0.6088 N (d2 ) = N(0.1263) = 0.5502 So: c 2850 * 0.6088 2800e 0.05*0.25T * 0.5502 213.65 Options Tool outcome: 213.62 (See Figure 13) 7.1.2 Binomial Tree Pricing Model The binomial tree’s values are calculated automatically from R statistics software. As a result, it cannot be tested because in this model there is an assumption of how the stock’s price will move in the future. I had to do a lot of testing to find out which formula the R program uses to give the results as there was no information about that in the R manual. The wide use of R statistics and the fact that the results are near the expected values increases the certainty for the outputs of the R project. 7.1.3 Delta Next, we can test the Delta factor, according to the equation in Section 4.2. The Delta factor, if the dividend is zero, should be equal with the cumulative probability of the normal distribution function. - 34 - δ = e 0.*0.25 * 0.6088 0.6088 Options Tool outcome: 0.6089(See Figure 13) 7.1.4 Rho Then, the testing of the Greek called Rho follows: ρ = KTe rT N (d 2 ) ρ = 2800 * 0.25e 0.05*0.25 * 0.5502 380.3557 Options Tool outcome: 380.4006(See Figure 13) For the next Greeks calculation the probability density function for a normal distribution will be used. N ' ( d1 ) 1 2T e d12 2 We have already calculated that d1 = 0.2763 N ' (0.2763) 7.1.5 γ= γ= 1 2 * 0.25 e 0.27632 2 = 0.3840 Gamma N ' ( d 1 )e qT S 0 T 0.3840 * e 0*0.25 = 0.000089 2850 * 0.3 * 0.25 Options Tool outcome: 0.000089(See Figure 13) 7.1.6 Vega ν = S 0 T N ' (d1 )e qT ν = 2850 * 0.25 * 0.3840 * e 0*0.25 547,20 Options Tool outcome: 547, 19 (See Figure 13) - 35 - 7.1.7 Theta θ= S 0 N ' (d1 )e qT 2 T qS 0 N (d1 )e qT rKe rT N (d 2 ) = 2850 * 0.3840 * 0.3 * e 0*0.25 2 0.25 0 * 2850 * 0.6088 * e 0*0.25 0.05 * 2800 * e 0.05*0.25 * 0.5502 => θ = - 328.32 + 0 - 76.071 = - 404.39 Options Tool outcome: -404.39(See Figure 13) 7.1.8 Put Call Parity Initially, we check if the Put Call Parity Equation stands: c Ke rT p S 0 c Ke rT 54 2800e 0.05*0.25 2819.21 p S 0 5 2850 2855 2819.21 2850 c Ke rT p S 0 So, there is an arbitrage opportunity, according to the theorem. Sell put Option and Stock which are overpriced and also buy call Option and invest money which are underpriced. Sell Stock: gain 2850 Sell put: gain 5 Buy call: give 54 Invest money: give now 2800e 0.25*0.5 2765.22 so as to take in three months (as the expiry of the Option is in three months) exactly 2800. As a result, the immediate cash flow will be: 2850+5-54-2765.22 = 35.78 When the expiry time comes, there will be two possibilities. The price of the stock will be either bigger or smaller than the strike price which is 2800. Our position, now, is that we hold a call Option, we have written a put Option and we also wait to receive the money from our investment. - 36 - The current stock price is 2850. If the price goes up, the call Option will be exercised, because we prefer to buy at a lower price, while the put price will not be exercised, because the holder will prefer to sell in the higher price which is not our strike price. So, the outcome will be: 1) Exercise call price: we will buy the stock for 2800 while its price is higher at S. So, the payoff of this action will be a gain equal to S-2800. 2) We will receive from our bank 2800, because of our investment. 3) We will buy a new stock in its new price S to complete the arbitrage. Result: S-2800+2800-S=0 Our profit is equal with the immediate cash flow: 35, 78 In the other case that the stock price goes down lower than our strike price, the initial cash flow will be the same as before (35,78) , but what will change is that the put Option will be exercised, while the call will not. All prefer to sell at the higher price (our strike price in this case) and buy in the lower. 1) The put Option will be exercised by the holder. He will sell us the stock for 2800. Our payoff will be – (2800-S) loss. 2) We will receive from our bank 2800, because of our investment. 3) We will buy a new stock in its new price S. 4) Result: S-2800+2800-S=0 Our profit is again equal with the immediate cash flow: 35, 78 Options Tool outcome: 35, 78 (See Figure 21) 7.1.9 Possible Crash Problems In this program a lot of exceptions (try, catch) and if statements are used to avoid any possible crash of the program, as there are some inputs that have to be putted manually by the user. The program informs the user if the inputs are wrong and immediately stops the process. For example, negative numbers, letters or symbols are not allowed. Only positive float numbers or positive integers are allowed. In addition, the steps to the Binomial Model were limited to 30, because if the steps were too many the program crashes. Many of possible ‘strange’ inputs were tried to test the program but there was never a crash. - 37 - 7.2 Feedback Name: Dr Yulia Veld-Merkoulova Profession: Senior Lecturer in Finance For the following 6 evaluation questions the values could be between 1 and 5, where 1 means definitely No and 5 means absolutely Yes. The evaluation questions were the following: Was the program: Friendly with the user:5 Easy to understand:5 Easy to handle:5 With nice graphics:5 Helpful for an Options Trader:4 Giving satisfactory answers: N/A Comments: ‘I do not know what is expected from you from your Department, but to me this project looks pretty fine. Maybe, if I had to add something, I would like to be more applicable, for example giving the user the capability to add different strike prices. The graphics are very nice, but I would like the binomial tree to support even more steps. I cannot answer if the outputs of this project are satisfactory, if I do not test them to see how accurate they are but they look correct at a first glance. ’ ’ - 38 - Name: Professor David McMillan Profession: Professor of Finance For the following 6 evaluation questions the values could be between 1 and 5, where 1 means definitely No and 5 means absolutely Yes. The evaluation questions were the following: Was the program: Friendly with the user:5 Easy to understand:5 Easy to handle:5 With nice graphics:5 Helpful for an Options Trader:4 Giving satisfactory answers: 5 Comments: ‘this program looks nice. If I had to add something to this program that would be the implementation of stock volatility, using the Black-Sholes model, so as not to have to put this input manually’. - 39 - 8 Conclusion Summary 8.1 The scope of this software package was the creation of a real helpful program for an Option trader, containing a variety of different applications. It could be said that it was an open-ended aim, but with specific parts. The way that that this goal would be achieved was not determined, because of further research that was needed after the proposal to find the best way. As a conclusion, it can be said that the Options Tool combine all the promised parts, with a flexible way of different techniques, so as to achieve the most accurate and well-displayed results. The outcome of this project is very helpful for anyone who wants to implement Options trading in computing languages. Evaluation 8.2 The program is ready to be used for all the objectives referred in Section 2.1. The implementation of this program was started by the already existing part of Option Strategies. That has the advantage of having a great point to start, but at the same time the disadvantage of having to understand and figure out someone else’s code. The conversion from applet to application was done successfully. One step further was made for the way the data is taken from the web. Now the user does not have to go to the ‘financial times’ web page and search among huge amounts of financial data to find the specific equity options data the program uses. The evaluation can be separated in the following parts: Pricing Options The three most famous Options pricing models were implemented successfully and they give accurate answers in a really friendly panel for the user. The Binomial Tree is displayed in some style taking the advantage of the R statistics package. The Binomial Tree is a great advantage of this project. I rarely found it in other programs for Options. Options Strategies The strategies are accurate and well-displayed in graphs and tables. The main changes made were to upgrade the graphics and to convert the applet to application. - 40 - Put Call Parity The implementation of this theorem, gives a comparative advantage to the application. I hardly found anything similar to my web search for Option software packages, probably because it exists only for European Options. So, as an outcome, it can be said that this part is the main innovation of this project. The outcome is accurate and the program can determine which position the arbitrageur should take to gain the profit. Finally, it can be said that the successful combination of all of these parts is what makes the program really helpful for an Option trader. 8.3 Future Work This program is just the beginning for a real tool for Options. The background behind Options contains even more models, strategies and theorems. In this software package there is a combination of them, but one can find only the most popular applications. First of all, the way the data is taken is the first thing that should be updated. It should be done automatically without any copy-paste need. The design can be improved to meet the standards we saw in Chapter 2 of the most powerful existing programs. A good idea could be the use of data mining methods, as there is a lot of data available from the Financial Times web page for the particular Options. Maybe, some of the diagrams concerning past price could be useful to someone that can read them successfully. Also, even more data can be found and added to the program by other web sources. More graphs could be added to help the trader. For example, one graph could be added for each one of the Greeks to display how the options’ prices are moving to the changes. Moreover, the round off class should be upgraded. Butterfly strategy had already been implemented, but I did not add it because a third option panel should be displayed in strategies label, making the strategies panel unfriendly to the user. Also, Butterfly strategies use three different strike prices, but ‘financial times’ market data does not provide us with a third strike price, so there is just an assumption about it. A way to add this strategy should be find to make more complete the program. It will be a significant upgrade, especially to put call parity panel, if the available interest rates could be automatically taken from the source. The source in this case can be a bank or any big organization. Also, time to maturity can be implemented so as it can be updated each moment based on the difference between now and the expiry date. In addition, stock’s volatility could be implemented using Black-Sholes model, so as to be calculated automatically. - 41 - One different step is a button that makes the program totally applicable, giving the freedom to the user to put all inputs manually and see the results. This could make the program ideal for educational use by students. A last big step could be a panel that allows the trader to create a portfolio of different equity Options and to use the already available applications not for a single equity Option, but for several of them together as one portfolio. - 42 - References [1] Students Awards Agency for Scotland Homepage, http://www.saas.gov.uk/index.htmI [2] Online Binomial Model Definition in Wikipedia, http://en.wikipedia.org/wiki/Binomial_options_pricing_model [3] Dr Yulia Merkoulova ,Lecture Notes on Derivatives module in University of Stirling, Spring 2010 [4] Options-Vue Systems International Homepage, http://www.optionvue.com/ [5] V-Options Homepage, http://www.voptions.com/ [6] Options-Aid Homepage, http://www.mindxpansion.com/options/index.php [7] Mandhurananda Pahar ,Implementation Of VaR and Options Strategies, University of Stirling,2010 [8] O-Trader Homepage, http://www.otrader.com.au/default.asp [9] Pro-Analyst Homepage, http://www.trendsoft.com/ [10] Options-Vue Order Page, http://www.optionvue.com/pricing.html [11] Option-Aid Order Page, http://www.mindxpansion.com/options/order.php [12] V-Options Order Page, http://www.voptions.com/order.html [13] O-Trader Download Page, http://www.otrader.com.au/free_stock_and_optiondownloads/free_option_pricing_calculator.asp [14] Option-Aid Screenshots Page, http://www.mindxpansion.com/options/fairvalue.php [15] Options-Vue Screenshots Page, http://www.optionvue.com/tour-optionvue-graphicanalysis.html [16] V-Options Screenshots Page, http://www.voptions.com/screenshots.htm [17] O-Trader Screenshots Page, http://www.otrader.com.au/viewpic.asp?FN=option_calc_lg.gif [18] Madhurananda Pahar, Implementation of VaR and Options Strategies, University of Stirling,2010 [19] Java Homepage, http://www.oracle.com/technetwork/java/index.html [20] http://en.wikipedia.org/wiki/Java_(programming_language) [21] Eclipse Homepage, http://www.eclipse.org/ [22] BlueJ Homepage, http://www.bluej.org/ [23] R Project for Statistical Computing Homepage, http://www.r-project.org/ [24] PDFOne Homepage, http://www.gnostice.com/PDFOne_Java.asp [25] http://en.wikipedia.org/wiki/Greeks_(finance) [26] John C. Hull ,Options, Futures and Other Derivates,7th edition - 43 - [27] PlotDemo.java Example Code, http://www.chibi.ubc.ca/maven/rserve/JRclient/examples/PlotDemo.java [28] Espen Haug, Black-Sholes in Multiple languages, http://www.espenhaug.com/black_scholes.html [29] Java Math online library, http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Math.html [30] Tutorial on Creating a Calendar Viewer Application, http://www.dreamincode.net/forums/topic/25042-creating-a-calendar-viewer-application/ [31] PDFOne Examples, How to Read A PDF File From A URL in Java, http://www.gnostice.com/nl_article.asp?id=207&t=How_To_Read_A_PDF_File_From_ A_URL_In_Java [32] Mandhurananda Pahar, Implementation of VaR and Option Strategies, University of Stirling,2010 [33] Financial Times Data Markets, http://markets.ft.com/research/Markets/Overview [34] R-Project package ‘fOptions’ Page, http://cran.rproject.org/web/packages/fOptions/index.html [35] R-Project package ‘fOptions’ Reference Manual, http://cran.rproject.org/web/packages/fOptions/fOptions.pdf [36] Rserve Homepage, http://rosuda.org/Rserve/ [37] rJava Homepage, http://rosuda.org/rJava/ [38] RCaller Homepage, http://www.mhsatman.com/rcaller.php [39] PlotDemo.java Example Code, http://www.chibi.ubc.ca/maven/rserve/JRclient/examples/PlotDemo.java [40] PDFBox Homepage, http://pdfbox.apache.org/ [41] iText Homepage, http://itextpdf.com/ [42] PDF Parser: Converting PDF to text in Java using PDFBox, http://www.prasannatech.net/2009/01/convert-pdf-text-parser-java-api-pdfbox.html [43] Online Intrinsic Value Definition in Investopedia, http://www.investopedia.com/terms/i/intrinsicvalue.asp#axzz1XBEPy0eB [44] Online Time Value Definition, http://en.wikipedia.org/wiki/Option_time_value#Time_value - 44 - Appendix 1 – User guide 1) Check if the date of the data it is the one you are interested in. The program in every panel informs the user which day’s data is used. If it is not, in the first panel there is a button named ‘Download Data’. Click on that button and a calendar will be displayed on the screen. Choose the specific day you are interested in and the program will inform you, if there is available data for this day. If there is go to the folder where the program is installed and copy the data from the PDF file named ‘download.pdf’ to the text file named ‘data.txt’. After, run again the program and check if the selected date’s data was successfully imported to the program. Note: Financial Times web page does not upload data every day. For example, weekends or public holidays there is no new data. 2) Now you are ready to use the application. Be careful when you fill the inputs. If they are wrong there are messages displaying the error. There is information available in the program about every input. Also, there are some general information about the models and the theorems. 3) If the Binomial Tree is not displayed check if the Rserve is running (See Installation guide). 4) If the program cannot find any data from the web, check your internet connection. 5) If something else is going wrong or you cannot fix the program with the current guide, my email address is available in the ‘Info’ pop-up. Feel free to contact me. - 45 - Appendix 2 – Installation guide 1) Copy the folder named ‘Options Tool’ in your directory. This folder contains all the Java files you need to run the program. 2) Connect to the internet so as to have access to the data source. 3) Install R software. 4) Run Rserve. Rserve has to be initiated to display the Binomial Tree. You have to write to R GUI the following functions: install.packages(Rserve) library (Rserve) Rserve () The install package command in essential only the first time the R is run. After the first time, the user has only to set the two last commands. - 46 -