NexusFi: Find Your Edge


Home Menu

 





A Quant's perspective on building a trading system.


Discussion in Trading Journals

Updated
      Top Posters
    1. looks_one SodyTexas with 31 posts (189 thanks)
    2. looks_two Limitless100 with 6 posts (2 thanks)
    3. looks_3 artemiso with 4 posts (3 thanks)
    4. looks_4 RickW00716 with 4 posts (1 thanks)
      Best Posters
    1. looks_one SodyTexas with 6.1 thanks per post
    2. looks_two fourtiwinks with 5 thanks per post
    3. looks_3 DarkPoolTrading with 4 thanks per post
    4. looks_4 bobwest with 1.5 thanks per post
    1. trending_up 27,926 views
    2. thumb_up 231 thanks given
    3. group 90 followers
    1. forum 74 posts
    2. attach_file 5 attachments




 
Search this Thread

A Quant's perspective on building a trading system.

  #61 (permalink)
Limitless100
New York, New York
 
Posts: 97 since May 2014
Thanks Given: 163
Thanks Received: 61


artemiso View Post
I guess you meant this?

Firstly, it sounds to me that you're using managed C++, which loses important benefits of the language without gaining anything. To be fair, my opinion is not so useful. I'm generally agnostic to the programming language. I have memory-hungry applications that would cost more in server power/computation time than developer salaries, so C# is not my weapon of choice. At the same time, I have many more lines of Fortran in production mode than C++, so I'm not the best person to defend C++ either.

I have been using unmanaged code in C++.

Quoting 



Hand-holding: C# .NET does a fair job of trying to hand-hold mediocre developers, e.g. it doesn't support multiple inheritance through classes; point-and-click UI builder in VS for writing industrial strength GUIs; I would also rather C++ has an immutable string library and think C# has the better default here. Microsoft steals good ideas every now and then (parametric polymorphism in 2.0, lambda expressions in 3.0), and I like the language direction. But I think choosing C# .NET over C++ because of anxieties over memory management is an uninformed decision.

It's a commonly-perpetuated myth that memory management is difficult in C++, and that you hardly need to worry about that in C# .NET/C++. I don't think that's the case - I don't want to get into this fight because everyone has written pages of arguments about this, but I can say that in the C# .NET programs that I've written for financial applications, I spent a lot more time making sure every object either lived forever or died immediately before it got promoted to generation 1/2. If you don't understand the purpose of this though, I'd honestly think you're better served with Java/C# .NET for now.

The practice of writing good code in C++ is mostly similar to that in C#. Prefer static dispatch over dynamic dispatch (C# .NET 4.0), maintain modular abstractions etc., so at the end of the day, the onus is still on the developer and has nothing to do with the technical merits of either language.

Thank you for the above comparisons, I also agree with the last statement regarding the developer having the final word over which language is best for them.

Quoting 

Concurrency: I don't know what others think but if you're going to make a living with this, you're going to have multiple cores on multiple machines. A reasonable way to parallelize your workload across multiple machines is to fork multiple processes and have them communicate via message passing. As far as I know, there's high-performance messaging middleware with efficient C++ interfaces, but not so much .NET interfaces. (I would probably recommend Solace if you were working with .NET.)

Absolutely.


Quoting 

Containers: C++'s STL containers are powerful and useful for what you're trying to do and have no practical equivalents in C#. An interview question I would give to a potential developer is to name/think of an application of a standard C++ container in a financial setting - if you don't know the answer, chances are that you're better off with C# .NET/Java.

Libraries and third party integration: There isn't even a serious numerical library or market access API with C# bindings (Lime/WEX, maybe). You could pay for Extreme Optimization's MKL wrappers, I suppose.

Low-level facilities: You should make up your mind - you probably picked C++ initially because of what you've heard about its performance (I think this is misguided), but you're going to have a hard time doing any meaningful performance measurement in C# without access to low-level facilities - so perhaps performance isn't really a concern for you after all?

I don't believe I'm following this last portion above. I was under the impression C++ did have access to low level facilities? Could you @artemiso or someone else elaborate on this portion.

Quoting 


MATLAB/R: My most serious problem with using array-oriented languages such as MATLAB/R/numPy is that it accustoms you to manipulate and analyze data in a very rigid, flat and uniform manner - it's a round hole and your market data is like a square peg that doesn't fit in it very well. For example, there's no clean way of processing sub-tuples containing both strings and integers in an array-oriented language. I personally like MATLAB over R/numPy because of its cleaner documentation and the proprietary package distribution model. Think of it as an iPhone. There are many good apps for the iPhone because it's a single spec with tightly-controlled, proprietary distribution; Android apps have to deal with different technical specs, screen sizes etc. Performance-wise, MATLAB's parallel processing model is also more convenient than R/numPy, and similarly, most CPU-bound operations are highly-optimized Fortran/C routines anyway.

I appreciate you opinion on this matter, thanks. It seems that MATLAB, in your opinion, provides additional benefit in exchange for a small expense. I believe there may even be an offer for a free download through university, which I recently discovered.

Quoting 

Basically, I did have a happier experience developing in Fortran and C++ than C#; Fortran and C++ have been more productive and have offered better development tools. To give you an idea, my best times-to-market were about 2 days in Fortran, C++ and Python vs 2 weeks in C#. Your mileage may vary.

Just to emphasize: I prefer these languages over C# because of their ease of development and availability of tools, and I didn't mention that speed was a deciding factor.



Oh no, no offense taken at all. @Limitless100 just wanted to hear my thoughts on C++, MATLAB, R and C# in reference to what you had mentioned.

Python is my go-to language for almost anything that takes less than 40 lines to express. But to wrap up on my point to @Limitless100 that I prefer to be language-agnostic, take this for example: How would I write a Python script that recursively checks if Quantopian's Zipline is a poorly-written library only designed for single-core processing at the application level? I can do this very quickly in Perl, but not Python:

 
Code
#!/bin/sh
grep -r multiprocessing zipline/ | perl -e 'while(<>){}; print $.,"\n";'

Every language has its elegant side, I'd learn many and choose whatever makes you feel comfortable and productive.

Anyway, I agree that we should move past a debate about programming languages.

I greatly appreciate your experienced insight @artemiso
I did not expect such a comprehensive and detailed answer. The information you have provided has helped to clear my mind and fortify my choices. I also agree with the last lines 100%, I have experimented with various languages already and I like C++ the most, it comes down to personal preference and what you can personally do the most with.

I apologize for bringing up an un-relevant programming topic in your thread OP! I am done now, just wanted to thank Artemiso.

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
59 thanks
Funded Trader platforms
37 thanks
NexusFi site changelog and issues/problem reporting
24 thanks
GFIs1 1 DAX trade per day journal
22 thanks
The Program
19 thanks
  #62 (permalink)
 
DarkPoolTrading's Avatar
 DarkPoolTrading   is a Vendor
 
Posts: 1,036 since May 2012
Thanks Given: 1,244
Thanks Received: 1,326


fourtiwinks View Post
@artemiso,

You have always made excellent and informative posts, but sad to see that you usually delete them.. sigh..

Agreed, I too enjoy his posts but find the constant need to delete them curious. In any case, everyone who is subscribed to the threads gets artemiso's replies via email even if he delete's them as per his modus operandi.

Diversification is the only free lunch
Follow me on Twitter Reply With Quote
  #63 (permalink)
 Ganymed 
Switzerland
 
Experience: Advanced
Platform: Ninjatrader
Trading: Futures
Posts: 40 since Jun 2009
Thanks Given: 386
Thanks Received: 30


Five

Reply With Quote
  #64 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224

SIX

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
  #65 (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


fourtiwinks View Post
@artemiso,

You have always made excellent and informative posts, but sad to see that you usually delete them.. sigh..


DarkPoolTrading View Post
Agreed, I too enjoy his posts but find the constant need to delete them curious. In any case, everyone who is subscribed to the threads gets artemiso's replies via email even if he delete's them as per his modus operandi.

Sorry, I didn't mean to flood the thread and someone else has already quoted my post anyway.

Reply With Quote
Thanked by:
  #66 (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


Limitless100 View Post
I don't believe I'm following this last portion above. I was under the impression C++ did have access to low level facilities? Could you @artemiso or someone else elaborate on this portion.

Yeah, there's a lot you actually can't do in C# .NET without interop; some of these are Windows limitations, I'm not sure if the same extends to Mono (never tried). I was saying, if you're debating between the two at all, then probably performance doesn't matter that much to you as you think.


Quoting 
I apologize for bringing up an un-relevant programming topic in your thread OP! I am done now, just wanted to thank Artemiso.

You're welcome and good luck as always.

Reply With Quote
  #67 (permalink)
Limitless100
New York, New York
 
Posts: 97 since May 2014
Thanks Given: 163
Thanks Received: 61


artemiso View Post
Yeah, there's a lot you actually can't do in C# .NET without interop; some of these are Windows limitations, I'm not sure if the same extends to Mono (never tried). I was saying, if you're debating between the two at all, then probably performance doesn't matter that much to you as you think.



You're welcome and good luck as always.

Okay that is what I thought you were referencing. I have been under the impression that C++ was the more wise choice for what I desire, which is why I chose it and am sticking with it. I simply wanted an educated opinion to shed additional light on the topic, which you did, thanks again.

Reply With Quote
  #68 (permalink)
 gers569 
Prescott, wi
 
Experience: Beginner
Platform: ninjatrader
Trading: Tf,Nq,Es
Posts: 4 since Dec 2013
Thanks Given: 6
Thanks Received: 3

Thank you for sharing your wealth of knowledge looking forward to taking in as much as I can.

Reply With Quote
Thanked by:
  #69 (permalink)
 romus 
Melbourne, VIC, Australia
Legendary Wicked Trader
 
Experience: Intermediate
Platform: NinjaTrader
Trading: SPI
Frequency: Every few days
Duration: Days
Posts: 781 since Dec 2010
Thanks Given: 1,975
Thanks Received: 3,154


SodyTexas View Post
Ok, lets talk about the next indicator, the SoderstromCloud. It is the Ichimoku Cloud with both the Senkou Span A and B but it add something unique to the mix.

If you do the math on the Snekou Span B it is always the 50% line in the Fibonacci retracement looking back the standard 52 periods of Ichimoku; and acts as either support or resistance. Many times you will see price peak out of this line and retrace back true it causing a false signal.



But what I did to add cushioning by expanding the Senkou Span B to the next nearest Fibonacci line. I am not a complete believer in Fibonacci, but because many traders are I think it becomes a self-fulfilling S&R. Logically, to me if I was going to fatten the Senkou Span B line (needed for proper position sizing using Van Tharps R-multiples) the next Fibonacci retracements makes sense.

Attached is the indicator, like before I will also post it in the elite indicator section.

Cheers, Sody


@SodyTexas
I have installed your indicator and only get a cloud visible.
How do I get other components?
Cheers,
romus

When nothing goes right... go left
Reply With Quote
  #70 (permalink)
 
SodyTexas's Avatar
 SodyTexas 
Austin TX
 
Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker: RJO
Trading: Futures, Spreads
Posts: 421 since Sep 2013
Thanks Given: 117
Thanks Received: 1,085



romus View Post
@SodyTexas
I have installed your indicator and only get a cloud visible.
How do I get other components?
Cheers,
romus

The other are the Ahrens indicator

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Visit my NexusFi Trade Journal Started this thread Reply With Quote




Last Updated on September 26, 2014


© 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