Serving the Quantitative Finance Community

 
User avatar
JTB
Topic Author
Posts: 0
Joined: August 20th, 2010, 9:28 am

Java applet: Black and Scholes

August 11th, 2011, 4:16 pm

I am trying to make a simple java applet for calculating option premium using B&S.Does anybody have tips (or code) for doing this?I want combine HTML and java. So I can put the input variables, and push a "Calculation buttom". Basically, I want to create something like this one:http://www.espenhaug.com/BS_applet.htmlMy final goal is to be able to add more option pricing formulasAny help on this topic would appreciated!
 
User avatar
Hansi
Posts: 41
Joined: January 25th, 2010, 11:47 am

Java applet: Black and Scholes

August 12th, 2011, 1:27 am

Yes, don't... Java applet? Where did you get access to a time machine?A) Use something modernB) Do you want to give up on quant finance and become a web developer?
Last edited by Hansi on August 11th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
acastaldo
Posts: 14
Joined: October 11th, 2002, 11:24 pm

Java applet: Black and Scholes

August 12th, 2011, 1:51 pm

QuoteJava applet ? [....] Use something modernCan you give a hint to us Troglodytes about the modern approach to develop a simple interactive Web app like this?
 
User avatar
Hansi
Posts: 41
Joined: January 25th, 2010, 11:47 am

Java applet: Black and Scholes

August 12th, 2011, 5:41 pm

I'm not a web dev but I'd go for HTML5 and Javascript for front end, Ajax for communication and back end in something limber and easy to use like Ruby, Python or even PHP for the backend. ASP.NET and C# is another option, but wouldn't define that as limber.
 
User avatar
tags
Posts: 3631
Joined: February 21st, 2010, 12:58 pm

Java applet: Black and Scholes

August 13th, 2011, 9:40 am

Once again Hansi sounds right commenting that java applets is old stuff.On the Collector's option calculator webpage, it reads "version 1.0 1999 (Java 1.2)" Nonetheless, there is a collection of code snippets in various programming languages, here . that may help ...
Last edited by tags on August 12th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
rusti999
Posts: 0
Joined: October 4th, 2007, 8:19 pm

Java applet: Black and Scholes

August 13th, 2011, 2:31 pm

If you still want to stick with the applet but want to challenge yourself, try writing the applet in Scala.
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

Java applet: Black and Scholes

August 13th, 2011, 6:42 pm

Or, if you know C++ and want to try something different, you may have some fun with the Wt C++ Toolkit for Web Applications.See documentation for intro & tutorials.You may also try looking at some examples, e.g., chartsJust go through Installing Wt on MS Windows to get it up and running (it's cross-platform, so it also works on others OSes).A fun project could be to hook it up to QuantLib! :-)
 
User avatar
JTB
Topic Author
Posts: 0
Joined: August 20th, 2010, 9:28 am

Java applet: Black and Scholes

August 13th, 2011, 6:43 pm

Is there a Quantlib for Java?
 
User avatar
Polter
Posts: 1
Joined: April 29th, 2008, 4:55 pm

Java applet: Black and Scholes

August 13th, 2011, 6:47 pm

 
User avatar
tags
Posts: 3631
Joined: February 21st, 2010, 12:58 pm

Java applet: Black and Scholes

August 13th, 2011, 6:54 pm

i didn't know the Wt library. thank you or sharing Polter
 
User avatar
ottbot
Posts: 0
Joined: July 4th, 2011, 3:15 pm

Java applet: Black and Scholes

August 14th, 2011, 4:34 pm

You could have a go at Chrome's NaCl (native client) and trying running some client side C/C++ in the browser. Though you seem pretty keen on Java! http://code.google.com/chrome/nativeclient/
 
User avatar
Strandi
Posts: 1
Joined: May 16th, 2011, 12:46 pm

Java applet: Black and Scholes

August 15th, 2011, 11:05 am

Try this one :-)http://www.christoph-junge.de/blackscholes.phpFull source code available for download.
Last edited by Strandi on August 14th, 2011, 10:00 pm, edited 1 time in total.
 
User avatar
JTB
Topic Author
Posts: 0
Joined: August 20th, 2010, 9:28 am

Java applet: Black and Scholes

August 15th, 2011, 11:45 am

Thanks, strandi. Will it work if I just push "run " in Eclipse?What I am wondering about; do I have to do anything else (PhP) ? Or Is it the "whole code, everything". Btw, I read your master thesis as well. It is very interesting, but the zip-link didn't work.Is it possible to get acces to that zip-file?
 
User avatar
Strandi
Posts: 1
Joined: May 16th, 2011, 12:46 pm

Java applet: Black and Scholes

August 15th, 2011, 12:18 pm

Run as Applet should do.To include it on a webpage you need some HTML tags...very basic.
 
User avatar
JTB
Topic Author
Posts: 0
Joined: August 20th, 2010, 9:28 am

Java applet: Black and Scholes

August 15th, 2011, 12:27 pm

It works perfectly, Strandi.Mange takk:-)