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,026 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 ......?

  #31 (permalink)
lenar
San Jose, CA
 
Posts: 5 since Aug 2013
Thanks Given: 0
Thanks Received: 0


Crow View Post
I agree. Apparently, there are firms that do high-frequency / low latency trading in Java. (removed url as the engine won't allow me to repost due to low number of posts - lenar) Depends entirely on what you are trying to do and how good of a programmer you are.

Ditto. It all depends on what you want to do. If you scalp, you want to squeeze last microsecond out of your algorithms. If you don't, it has to be "fast enough" - i.e. it has to process a signal before next one enters the system. That said, with proper architecture most delays would be due to latency rather than language. C++ over Java makes sense if latency is already reduced to nothing (i.e. datacenter next to exchange) and you do want to squeeze every last microsecond out of your algorithms. You can also make a case that whatever little advantage C++ has can be negated by fixed amount of additional resources (I'm talking about CPU here, not memory, memory management is a different topic). However, in apple-to-apple comparison (identical environment, identical architecture, etc) - C++ would be an easy pick.

As for the hiring firm – it's never apple-to-apple and Java offers better and faster development cycle.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
Increase in trading performance by 75%
The Elite Circle
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #32 (permalink)
lenar
San Jose, CA
 
Posts: 5 since Aug 2013
Thanks Given: 0
Thanks Received: 0


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

I've found Javascript to be superior to C++ in several way. I've found Perl to be superior to C++ in several ways. I've found Python to be superior to C++ in several ways. So?
Are you saying that Fortran program will run faster, given proper design in both cases? I was addressing need for speed in that part of the assessment. I doubt it, both are compiled languages. Or are you saying that the system would be easier to design in Fortran?

Reply With Quote
  #33 (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
I've found Javascript to be superior to C++ in several way. I've found Perl to be superior to C++ in several ways. I've found Python to be superior to C++ in several ways. So?
Are you saying that Fortran program will run faster, given proper design in both cases? I was addressing need for speed in that part of the assessment.

Yes, I am saying that. It's both marginally faster (not all compilers are born equal) with the same amount of optimization effort, and easier to design with, since Fortran has no pointers, is fully static and inherently parallel. There's good, non-legacy reason why it's still the most commonly used language in HPC.

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

I see. Can't really comment as I don't speak Fortran. Perhaps TS should add it to the list of evaluated options then.

Reply With Quote
  #35 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,212
Thanks Received: 101,599

Any programmer can turn the best language into the shittiest code...

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #36 (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

The problem in TS's case though, is that he is probably bound by a certain budget that limits him to a particular API, of which it's more difficult to find a native Fortran API.

I was commenting about the use case that you're referring to: exchange protocols are generally language-agnostic, so there's nothing saying C++ is superior if your application is latency-sensitive.


Big Mike View Post
Any programmer can turn the best language into the shittiest code...

Mike

Oh well, that's true too.

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


lenar View Post
As for the hiring firm – it's never apple-to-apple and Java offers better and faster development cycle.

That's why for me anyway, it makes the most sense to develop the strategy in Java and move to C++ if I need more speed.

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


lenar View Post
I've found Javascript to be superior to C++ in several way. I've found Perl to be superior to C++ in several ways. I've found Python to be superior to C++ in several ways. So?
Are you saying that Fortran program will run faster, given proper design in both cases? I was addressing need for speed in that part of the assessment. I doubt it, both are compiled languages. Or are you saying that the system would be easier to design in Fortran?

Intel only makes 2 compilers. One for C/C++ and the other is for Fortran. There is probably a reason why they still make a compiler for Fortran even though relatively few programmers actually know Fortran. Although I have never used it, for numerical applications and speed, I bet it really kicks ass.

Reply With Quote
  #39 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,212
Thanks Received: 101,599

What about F# while we're at it? I think @NJAMC may have an opinion...

Sent from my LG Optimus G Pro

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #40 (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



artemiso View Post

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

Really appreciate your insights. Curious to hear more of your thoughts on Python... I keep hearing/reading that R+Python has become very popular in the HF space.

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