Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 415897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:25:35+00:00 2026-05-12T18:25:35+00:00

I am in the process of designing a trading application which will use a

  • 0

I am in the process of designing a trading application which will use a Market’s API to place orders on the Market. This isn’t a complex high performance algorithmic trading application of the kind found in investment banks. This is just a small personal application which will trade maybe two or three times a day depending on market conditions/trends
The application will consist (roughly) of the following modules/packages:
Strategies
– The actual trading algorithms
Analytics
– The classes for analysing the live prices & orders on the market to produce buy/sell signals
Services
– The classes used to maintain a connection to the market, retrieve market information and place buy/sell orders.

So far, everything required for the application seems to be available on the internet:
* Apache CXF for generating the Java classes used for accessing the market’s web services.
* Apache Maths for the performing the pricing analytics
* Wikipedia for the various design patterns i.e. Factory, Subject/Observer, State, etc..

Where I’m really stuck however is with the algorithms. I’ve decided to use the State pattern to partition, into logical groupings, the various pieces of logic which should be performed when certain market conditions are met. The problem is that I’m beginning to see that it is very likely that each state class will contain an explosion of if else statements:

if(this_condition) {
    // do something
} else if (another_condition) {
    // do something else
} else {
    // etc..., etc...
}

I can’t help but feel I’m missing something here and that there must exist some framework or design pattern I don’t know about which enables the developer to encapsulate all the inputs and outputs of a given business context into a finite number of business actions [input/output] on which business rules[algorithms] can be built. I.e. Rather than having to hardcode the algorithms I’m hoping that it should be possible to make the application into a rules processor of some sort. Unfortunately I don’t know where to start on this. I hope I’ve explained my dilema clearly enough, if you would like me to clarify anything please let me know.
Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:25:36+00:00Added an answer on May 12, 2026 at 6:25 pm

    I would take a look at some rules engines,

    Drools – drools.org

    or

    Imperius – http://incubator.apache.org/imperius/

    It’s likely you’re going to be reacting to realtime market data. This is something that Complex Event Processing (CEP) tools are perfect for. Check

    http://esper.codehaus.org.

    hth

    ste

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in the process of designing the architecture of an application I’m planning on
I am designing a simple web-based application. I am new to this web-based domain.I
I am in the process of designing a financial web page (using Java, Wicket,
I'm in the process of learning and designing an app for our company. At
We're designing a WPF / MVVM application that allows the user to search and
I am designing a web interface to a certain hardware appliance that provides its
I am a c++ programmer, and I am looking forward to learning and mastering
How to implement casting to a private base class in C++? I don't want
I'm a member of a small but fairly sociable online forum, and just for
I’m after some thoughts on how people go about calculating database load for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.