Home ABOUT CONTACT SEARCH LINKS DICTIONARY ACCOUNTING & FAS 133 BIG APPLET ASK DR. RISK! CREDIT RISK CREDIT DP CURRENCY ENERGY EQUITY FIXED INCOME TRADING POST PERSONAL IF ONLY ... DEAL MARKET RISK MODEL RISK BOOKSHELF MATH APPENDIX JAVA JOBS! CALENDAR GAMES DEVIL'S DD
| | Java for Derivatives Last
revised: March 02, 2002
Do you think that "Java Chips"
will soon displace doughnut's from the policeman's diet? If so,
then you might benefit from a quick introduction to the new
computer language, Java, and some of its applications to
derivatives.
A Taste of Java
In Richard Karpinski's concise language,
"Java is a simple, object-oriented, distributed,
interpreted, secure, architecture-neutral, portable,
high-performance, multi-threaded, and dynamic language. (Netguide,
February 1997, p. 135.) Let me elaborate in my own words,
briefly.
- Simple. Simplicity is
relative and subjective. If you think C++ is simple, then
Java will bore you to death.
- Object-Oriented. Although
Java allows sequential procedures, it shares with C++ an
ability to "morph" abstract general objects
into useful special cases.
- Distributed. Applets can sit
anywhere on the Internet. You grab them when you need
them.
- Interpreted. This is tricky.
In order to put Java source code to work, you must
compile it at what we'll call level 1. Your Java-enabled
web browser has a Java "Virtual Machine" that
can interpret this code. In addition, some CPUs can run
what we'll call a level 2, "just in time"
compiler that compiles level 1 code, as needed to run the
application.
- Secure. You don't have to
worry so much that an applet will give your computer a
virus, because Java's design makes it difficult for the
applet to write to the usual vulnerable places on your
computer. Of course, an applet could still do a great
deal of "nonviral" damage.
- Portable. You can port an
applet to any computer Mac, PC, Sun, mainframe,
etc. that has an operating system with a Java
"Virtual Machine". Then you can run the applet
with a "Java-enabled" browser. For example, Daniel Sigrist wrote a Black-Scholes Option Pricing
Calculator on his Mac, and I've
run it flawlessly from my Netscape and Microsoft Internet
Explorer browsers on Compaq and Dell PCs. I'm waiting
word that it runs on a Sun.
- Multi-Threaded. Java suits
multitasking well. You can run several programs
simultaneously along separate "threads of
execution". (Java Programming for Dummies, p.
195)
- Dynamic. The document you
produce with HTML just sits there and sleeps. Java can
wake it up and start it singing and dancing. If you've studied bipolar disorders in
abnormal psychology, Java is to Mania (note the large M)
what HTML is to depression (with a small d).
In addition to Mr. Karpinski's points,
let me add:
- Memory Management. You can't
notice from the application, but Java manages memory
better than C++.
- Use of Internet. Java lets
you use the Internet that the government built for
billions as your own international communications network
at a fraction of what the big boys now pay.
- Novelty. We don't know how
well it will work, or if superior approaches will evolve.
If you want to know more about Java, I'm
particularly fond of two introductory books Java for
Dummies and Java Programming for Dummies (both, Foster
City, CA: IDG Books, 1996). Don't let their condescending names
mislead you into thinking that they are too elementary. They
contain information that you can understand and bring to life
right off the page and attached CD-Rom. You can find much
additional information at computer store's newstand.
The Future of Java
We at the William Margrabe Group, Inc.
think that systems for pricing derivatives and managing their
market and credit risk will make increasing use of portable
languages, such as Java and J++, and scripts, such as JavaScript,
and ActiveX. Moreover, we await Microsoft's countermoves to
incorporate Java's advantages directly into its Office Suite. The
battle has just begun, the stakes are enormous, and we users will
benefit tremendously.
Currently, C++ is the dominant language
of choice for financial calculators and systems, because C-coders
can build systems quickly (largely due to C's object orientation
and large libraries) and running speed (because it is so close to
the machine's language). Today, Java falls noticeably behind in
running speed, matches C++ in coding speed, and races ahead in
usefulness on the World Wide Web and portability from one
combination of hardware and software to another. When "Java
chips" on PCs, workstations (Sun's main interest), and
mainframes replace "virtual Java machines" Java will
dominate today's C++. Will the developers of C++ see their
market share shrink, or they will make C++ as portable and
"networthy" as Java? Purveyors of office suites, such
as Office 97 and Corel Office 7 are already offering better
connections with the Internet mainly with HTML. How long
before they wake up and smell the Java? Since I wrote these
words, originally, I found the the answer: Corel has a beta
version of an all Java office suite almost ready. Will people be
using it before you read these words?
Derivative Applets
While we sit comfortably in safe zones
and await the outcomes of these battles and the war, let's look
at some simple Java applications in the worlds of games and
derivatives.
- Axone Services and Developpement S.A. Option
pricing calculators.
- Interactive Quote. Option calculator: from
vol to price and price to vol.
- J.F.O.X. The home
page and E-mail address
for the Java (TM) Financial Object Xchange
(SM) (J.F.O.X.), which promotes Java and distributed
object development in the Financial Services industry.
- Numa Financial Systems. Derivatives calculators
.
- Random Walk Computing, Inc. Black-Scholes and
Binomial calculators.
- [Daniel] Sigrist. A downloadable, Black-Scholes calculator (for European
Put and Call prices and Greeks) that he wrote in Java for
the William Margrabe Group, Inc.
- WebRisk. Black-Scholes on-line calculators
(Java applets) for (1) option pricing, Greeks, and graph,
(2) day counts for computing (swap, etc.) payments, and
(3) yield curve.
Finance Applets and JavaScripts
Fun and Games
| |
Click
here to email Dr. Risk or the William Margrabe Group
ABOUT
CONSULTING AT THE WILLIAM MARGRABE GROUP, INC.:
Investment,
Risk Management,
Derivatives, and
Financial Engineering
Our other web sites:
www.FreeOption
Pricing.com
Free option pricing calculators from here and around the world.
www.RiskManagement
Digest.com
Summaries
of the best articles
from the best publications
in the risk management trade press.
www.Derivatives
Digest.com
Summaries
of the best articles from the best publications
in the derivatives trade press.
www.AskDrRisk
.com
Answers to your questions about Investment,
Risk Management,
Derivatives, and
Financial Engineering
|