Wallstyouth
Vice President
- Joined
- 5/25/07
- Messages
- 116
- Points
- 28
I'll add two more suggestions to what has already been said. For real-time applications
that need to process tick-by-tick data, Java's non-deterministic garbage collection
is a killer. For example, an algorithm missing a few ticks or a pricing model missing an
update to an underlying instrument or yield curve could result in significant losses.
Some shops have found ways to code around this and the result starts to look
a lot like C++ anyhow. There is some movement towards the Real-Time specification for Java
(https://rtsj.dev.java.net/) that (among many other things) puts some rules and/or limits
around when garbage collection can occur and the resources it can use in doing so.
Another aspect to consider are the very same hordes of libraries out there for Java.
Using such libraries has its own risks (who maintains the lib.? Will they
continue to do so? Will an update to that lib. break our application? How do we know
the performance characteristics of the lib. will endure? and so on).
So it would appear that banks would rather develop much of this code form scratch.
For example, one bank I am familiar with (who uses Java) coded all of the interfaces for
their app. from scratch rather than use Swing or any of the dozens of other interface
toolkits available.
Cheers,
Prof. H.
Also, if you just change the word Java by Linux in that sentence and you'll have another analogyI fully respect C++ but Java has caught in many areas and I think if more people spoke up about Java and pushed for Java it can easily be accommodated![]()
The reuse of core API/classes tend provide better performance and cleaner code as more eyes have seen that piece of code.
Well, the same thing could be said about C++ (although, regarding performance, C++ is still better). I program in Java everyday and I like it a lot but, like any programming language, it has its own quirks to deal with.
There are some interesting essays written by Paul Graham about programming in general and some other topics. Check them here:
Essays
Here is what he has to say about Java,
Java's Cover
Another aspect to consider are the very same hordes of libraries out there for Java.
Using such libraries has its own risks (who maintains the lib.? Will they
continue to do so? Will an update to that lib. break our application? How do we know
the performance characteristics of the lib. will endure? and so on).
! A fortran95 program for BS option
! By djd
!
program main
implicit none
integer anyKey
real*8 S,K,T,r,v
real*8 BlackScholes
real*8 price
S = 60.0
K = 65.0
T = 0.25
r = 0.08
v = 0.3
price = BlackScholes(S,K,T,r,v)
write(*,*) price
anyKey = system("pause")
end
!
real*8 Function BlackScholes(S, X, T, r, v)
! Put
real*8 S,X,T,r,v
real*8 d1, d2
d1 = (Log(S / X) + (r + v**2. / 2.) * T) / (v * Sqrt(T))
d2 = d1 - v * Sqrt(T)
BlackScholes = X * Exp(-r * T) * cdf(-d2) - S * cdf(-d1)
Return
End
!
real*8 Function pdf(x)
real*8 x,A
A = 1.0/Sqrt(2.0*3.1415)
pdf = A * Exp(-0.5*x*x)
return
end
!
real*8 Function cdf(x)
real*8 DPI,x,L,k,a1,a2,a3,tmp,pdf
a1 = 0.4361836
a2 = -0.1201676
a3 = 0.9372980
DPI = 3.1415926535897932
L = Abs(x)
k = 1. / (1. + 0.33267*x)
tmp = a1*k+ a2 * k**2. + a3 * k**3.
cdf = 1.0 - pdf(x)*tmp
if(x.lt.0.) then
cdf = pdf(x)*tmp
end if
return
end
Also, C++ is better for big projects
He just copy and pasted from Post #4, from 2007.You really have no idea of what you are talking about.
If that's the answer, then what's the question? Looks like a product plug?These Java guys claim they are faster than C++: http://www.coralblocks.com. Their performance numbers are very aggressive.
If that's the answer, then what's the question?