NexusFi: Find Your Edge


Home Menu

 





C++ or java or ......?


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one artemiso with 8 posts (11 thanks)
    2. looks_two FKtrader with 6 posts (0 thanks)
    3. looks_3 Crow with 5 posts (1 thanks)
    4. looks_4 lenar with 5 posts (0 thanks)
      Best Posters
    1. looks_one artemiso with 1.4 thanks per post
    2. looks_two shodson with 1.3 thanks per post
    3. looks_3 Big Mike with 1 thanks per post
    4. looks_4 Nicolas11 with 1 thanks per post
    1. trending_up 23,038 views
    2. thumb_up 30 thanks given
    3. group 16 followers
    1. forum 53 posts
    2. attach_file 0 attachments




 
Search this Thread

C++ or java or ......?

  #21 (permalink)
 ntvola 
Orange County, CA / United States
 
Experience: Advanced
Platform: NinjaTrader, Excel/VBA
Broker: IB / Kinetick / eSignal
Trading: Equities
Posts: 17 since Nov 2012
Thanks Given: 12
Thanks Received: 16

adamribica,

This article should help...

BEST PROGRAMMING LANGUAGE FOR ALGORITHMIC TRADING SYSTEMS
Best Programming Language for Algorithmic Trading Systems? - QuantStart

If your platform supports it, I would recommend C# for your project. It is highly unlikely that you will *need* C++.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
Increase in trading performance by 75%
The Elite Circle
MC PL editor upgrade
MultiCharts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
36 thanks
Tao te Trade: way of the WLD
24 thanks
Spoo-nalysis ES e-mini futures S&P 500
21 thanks
Bigger Wins or Fewer Losses?
19 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #22 (permalink)
 Crow 
Las Vegas, Nevada
 
Experience: None
Platform: MultiCharts
Posts: 52 since Apr 2010
Thanks Given: 20
Thanks Received: 19

I would say that how good the programmer is (how smart he or she is regarding choice of data structures and algorithms) and generally how much thought is put into the system design will have a much, much greater impact on the performance of the application than choosing Java or C++. Personally, for me it's Java, not so much due to the language, but due to the Eclipse IDE. I've found Eclipse with Java to be much more productive than C# or C++ in Visual Studio, some may disagree. In any case, I'd start with Java and move to C++ if you really need more power. Also, if you go with C#, then you've just locked your system into Windows so better find a good virus scanner and an extra core or two to run it.

Reply With Quote
  #23 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


keep in mind java now owned by oracle, it will be updated the way oracle wants it to go.

Reply With Quote
  #24 (permalink)
 artemiso 
New York, NY
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,685

Depends on what you're trying to achieve. Among the OO languages,

0. If you're trying to write crap, use Python.

1. If you're trying to write crappy GUIs, use Java. As has been pointed out, the direction of Java is bad as it is led by Oracle, and there are too many protocols for doing things.

2. If you're trying to spend weeks rewriting makefiles and figuring out dependencies for libraries, use C++.

3. If you're trying to spend weeks writing bad code to trick the JIT and using poor libraries or interop bindings rather than native APIs for larger libraries, use C#.

Lastly, when you're picking a good developer, don't ask him how many years of development experience he has. It's not the number of years and lines of code that he has written, but the contributions to the projects that he has made. I can confess that I've rejected someone with 15 years of development experience, several recent years maintaining the HPC stack at Yahoo Finance using relevant technologies, Tibco etc. (they're surprisingly developed - I think Yahoo owns the 3rd most servers after Google and Microsoft). I've also accepted someone with 4 years of development experience because they wrote the entire test and staging environment for a major product at Google, and I made the right choice because the person made me take interest in decisions that I was never interested about. So,

0. Find someone who will make you take interest in things you've never considered, not someone who will just listen and create what you described to them, even if it's crap. (This is for a web development stack, but imagine the same scenario with whatever you're developing: How a Web Design Goes Straight to Hell - The Oatmeal)

1. Generally, I find it easier to filter out bad developers based on the combination of languages that they've learned. A person who is experienced with 4 different OO languages is often not as good as the guy who learned Prolog and Scheme. I don't mind hiring the latter so he spends some time learning the syntax of a language that we use for inhouse development, but there are troves of the former.

Reply With Quote
Thanked by:
  #25 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

( I would especially agree with the end of your message. I am not a professional programmer, but I am rather fluent in Java, and progressing in C++. I indeed practiced a lot Scheme and Prolog... for my pleasure, and am still doing so. This complete shift of paradigm induced by the 2 languages helped me to have more ideas in... OO languages. )

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #26 (permalink)
 Crow 
Las Vegas, Nevada
 
Experience: None
Platform: MultiCharts
Posts: 52 since Apr 2010
Thanks Given: 20
Thanks Received: 19


artemiso View Post
Depends on what you're trying to achieve. Among the OO languages,
1. If you're trying to write crappy GUIs, use Java. As has been pointed out, the direction of Java is bad as it is led by Oracle, and there are too many protocols for doing things.

I agree with all your other points, but I find that I spend more time focusing on other aspects of the trading system besides the look and feel of the GUI. The Swing framework could be improved, but it's sufficient for what I am doing. And I have yet to find a better open source charting framework than JFreeChart for any language.

Java development is mostly driven by the Java Community Process. Oracle just steps in when they think they can sue other companies for patent infringement. I would rather they not do that as I think they are shooting themselves in the foot, but they have open sourced most if not all of the JDK through the OpenJDK effort.

Reply With Quote
Thanked by:
  #27 (permalink)
 artemiso 
New York, NY
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,685


Nicolas11 View Post
( I would especially agree with the end of your message. I am not a professional programmer, but I am rather fluent in Java, and progressing in C++. I indeed practiced a lot Scheme and Prolog... for my pleasure, and am still doing so. This complete shift of paradigm induced by the 2 languages helped me to have more ideas in... OO languages. )

You're better than most of us, I'm sure.


Crow View Post
I agree with all your other points, but I find that I spend more time focusing on other aspects of the trading system besides the look and feel of the GUI.

Sure, I don't disagree with what you're saying.

1. GUI can be very important. A majority of the time you might spend as a quant in the sell-side is simply writing and maintaining a GUI for some valuation model that someone smarter than you had written, so I have come to acquire respect for good GUI. Another thing is that I come from a physics background, and most physicists have Feynman-envy; meaning, we care a lot about elegant visualization because it avails better intuition of the problem. Finally, if you have a client-facing job, a demonstration of the GUI is definitely several times more powerful than a thick PPM stack.

2. For me, the problem with Java/C# is that the memory management is not deterministic, and this an incurable flaw by design of its advertised benefit. This is not necessarily a problem, depending on what you're up to.

3. C++ isn't the only alternative and I recommend people choose their development language based on their familiarity and business needs, not to pick what is most popular. If you have to write to a specific API or platform, or count a lot on the typical time series or statistical stuff, then I suppose you have little choice, and might even have to resort to polyglotism. My team had some flexibility as we do very little statistical modeling, and even if we do, we preferred geometric analogs - so we had to rely very little on the traditional charting libraries. (We treat functors and categories as first class citizens - not time series, so we've become huge fans of MetaPost for our visualizations.) And so, we dropped everything in favor of mostly Fortran, and we're extremely happy with the move.

Reply With Quote
Thanked by:
  #28 (permalink)
lenar
San Jose, CA
 
Posts: 5 since Aug 2013
Thanks Given: 0
Thanks Received: 0


adamribica View Post
Hello traders,
I want just to know what is the best language to make a strong,fast and stable automate trading programme?
I have some idea and i want to make it an automated system,that's why i contact some professional software programmer.They charge different fee because of the language using:C++ or java ........, that's why i want to know what is the difference between this two languages?I appreciate any advice or suggestion.
I'm not a programmer and i don't have experience in programming that's why explaining in detail will be really appreciated.Thanks for your reply.
Thanks in advance.

You may choose from c++, java, python - to name a few, but understand that domain knowledge is infinitely more important than language of implementation. If your concern is price of hire - imho, you haven't done your homework thoroughly enough. Someone who's able to deliver such a platform will command top dollars no matter what the language of implementation is. They should understand real-time programming, scalability issues, concurrency issues, lifecycle management of different types of orders; depending on what you want to achieve they also may need to be good at math (on the advanced side of higher education). There are many other points that I won't cover. Point is, if you factor them all in, your question – "what's the best language?" - is naive.

There is but one exception I can think of. If you plan to scalp exclusively, C++ is the way to go, along with having a datacenter right next to exchange. It has nothing to do with price point though, just a technical requirement.

Everything I said applies to one-two persons shop. The situation is different if you are trying to make a business case and build a team. But then you can't ask your question in such a generic form; you'd need to put together specific requirements and break it down into multiple questions that would speak in terms of man-hours.

Reply With Quote
  #29 (permalink)
 Crow 
Las Vegas, Nevada
 
Experience: None
Platform: MultiCharts
Posts: 52 since Apr 2010
Thanks Given: 20
Thanks Received: 19


lenar View Post
There is but one exception I can think of. If you plan to scalp exclusively, C++ is the way to go, along with having a datacenter right next to exchange. It has nothing to do with price point though, just a technical requirement.

I agree. Apparently, there are firms that do high-frequency / low latency trading in Java:

High-Frequency/Low-Latency Java Software Engineer, Cutting-Edge Proprietary Trading House ? New York, USA recruitment - Information Technology careers in the USA

I think some people have more performance issues with Java than others. Depends entirely on what you are trying to do and how good of a programmer you are.

Reply With Quote
  #30 (permalink)
 artemiso 
New York, NY
 
Experience: Beginner
Platform: Vanguard 401k
Broker: Yahoo Finance
Trading: Mutual funds
Posts: 1,152 since Jul 2012
Thanks Given: 784
Thanks Received: 2,685



lenar View Post
There is but one exception I can think of. If you plan to scalp exclusively, C++ is the way to go, along with having a datacenter right next to exchange. It has nothing to do with price point though, just a technical requirement.

Not really, I've found Fortran to be superior to C++ in several ways.

Reply With Quote




Last Updated on October 23, 2013


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts