Menu

Trading strategies java

4 Comments

trading strategies java

As you know, trading strategies take actions based on real time feed, such as when the bid or the last trade price changes. A data feed provider streams quotes to our desktop application asynchronously in a separate thread from the main thread. This data feed thread is spawned when you make a request to the data feed provider and lives until you explictly send a request to stop the streaming. As it stands, the data feed thread executes trading strategies because most of them are designed to enter or update orders upon tick data. Do you see any problem with this approach? Is this design common in trading applications? You definitely don't want strategies execute a trading strategy on the data feed thread, particularly if the execution takes a while. That execution should happen on a different thread. I am not that familiar with Java, but I assume you could make use of a thread pool there. In C a very powerful way to spread out work over multiple threads would be using Tasks. Another thing you might want to think about is what to do when there are new ticks for an instrument while you are still processing the previous tick. In many cases it makes sense to only process trading most recent one. I have written up a little post on what I termed trading most recent update pattern with a sample implementation in C. Maybe you find that useful. The data feed thread triggers the execution of trading strategies. You don't want any other processing to slow down the data feed thread. By posting your answer, you agree to the privacy policy and terms of service. Stack Overflow Java Developer Jobs Documentation beta Tags Users. Sign up or log in to customize your list. Tour Start here for a quick overview of the site Help Center Detailed answers to any questions java might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us. Log In Sign Up. Join the Stack Overflow Community. Stack Overflow is a community of 7. Join them; it only takes a minute: Data Feed Thread Executing Trading Strategies? Tom Tucker 3, 16 60 PersonalNexus 1 7 Thanks for the answer and the link! Gilbert Le Blanc Thanks, should I spawn a new thread for trading strategy execution for every tick data? My answer will depend somewhat on what language you're using. The data feed thread should send a signal for each tick to a supervisor thread that determines if this tick is an element of one of your trading strategies. If so, the supervisor thread will determine if all of the elements of a particular trading strategy are in place. If so, the supervisor thread starts a trading thread to execute the particular trading strategy. The supervisor thread has to queue the ticks, so it doesn't lose any tick data while determining which trading thread s to execute. I'm using Java BTW. Sign up or log in StackExchange. Sign up using Facebook. Sign up using Email and Strategies. Post as a guest Name. Developers Who Use Spaces Make More Money Than Trading Who Use Tabs. Stack Java works best with JavaScript enabled. MathOverflow Mathematics Cross Validated stats Theoretical Computer Science Strategies Chemistry Biology Computer Science Philosophy more 3. Meta Stack Exchange Stack Apps Area 51 Stack Overflow Talent. trading strategies java

Free Java open source Algo Trader demo running automated strategy for high frequency trading

Free Java open source Algo Trader demo running automated strategy for high frequency trading

4 thoughts on “Trading strategies java”

  1. airstarh says:

    Singh V, Jaiswal A, Porter, JDH, Ogden JA, Sarin R, Sharma PP, Arora VK, Jain RC.

  2. admak says:

    Have they ever considered what would have been the meaning of separation if it had been assented to by the Northern States when first demanded.

  3. alexdjdeg says:

    OD4725 - Hydraulic Fracturing Services OD4869 - Window Installation OD4870 - Insulation Contractors OD4871 - Artificial Grass Turf Installation OD4873 - Solar Water Heater Installation OD4926 - Grease Trap Cleaning OD5029 - Shortline Railroad Operation OD5033 - Heavy-Duty OTR Tire Mfg.

  4. alex_dz says:

    Graduation rates of our entering freshmen are among the highest in the nation.

Leave a Reply

Your email address will not be published. Required fields are marked *

inserted by FC2 system