• TIME TO 2024 UK RANKINGS

  • C++ Programming for Financial Engineering
    Highly recommended by thousands of MFE students. Covers essential C++ topics with applications to financial engineering. Learn more Join!
    Python for Finance with Intro to Data Science
    Gain practical understanding of Python to read, understand, and write professional Python code for your first day on the job. Learn more Join!
    An Intuition-Based Options Primer for FE
    Ideal for entry level positions interviews and graduate studies, specializing in options trading arbitrage and options valuation models. Learn more Join!

how to define trading rules? and trading rule interpreters?

Joined
9/1/10
Messages
6
Points
11
Now I am working on a trading simulation project. I have historical stock price data, and I want to identify a profitable trading strategy. Specifically, what I want to do are:

1) define a kind of "language" of trading rules, which can represent different trading strategies
2) I need to interpret the trading rules, and back-test trading strategies with historical data.
3) My experiment will need to traverse the space of large set of trading strategies, and identify the most promising one(s).

I searched over some literature and online resources, I found trading rules could be atomic rules or composite rules. For example:

atomic trading rules:
if MA(25) > MA(50) then trigger LONG signal
if Vol(25) < Vol(50) then trigger SHORT signal

composite trading rules:
LONG and LONG ==> LONG
LONG and SHORT ==> NEUTRAL
SHORT and SHORT ==> SHORT

However, I didn't find a completed definition of trading rules, or a language that is capable of defining completed set of trading rules. My purpose is to try various trading strategies with maximum flexibility as well as minimum effects. My understanding is, some open source or commercial back-testing systems could be able to define various trading rules and have an interpreter to understand these rules for trading simulation. But I haven't found these kind of systems that fit my purpose. Anyone know these? any inputs are appreciated!! Actually I like open source system, and preferably with Java-like API.

Thanks for yoru helps...
 
are you looking for commercial or free?

check TradeStation, OpenQuant and Amibroker.

Even better, buy one issue of "Technical Analysis for Stocks and Commodities". You will find different systems there with their own languages.
 
Actually I prefer a free system.

Thank you for your information. I will try out TradeStation, OpenQuant and Amibroker, and see what's going on.

Another basic question is, I also want to design a signal-based trading system. But I have some concern about this: how the entry/exit time points are paired?

For example, Right now I am full-position, and simultaneously my system detects a strong signal for long-entry. But I have no extra money at all, and I have no other exit signals and so I have to keep my current positions. Then how to handle the strong long-entry signal? What's the usually way to do it?

thanks...actually I am quite new in this area...
 
Then examine why you have no money. If you are getting more signals then you have money, put less money in your positions. Position sizing is the hardest part of building a trading strategy, it's the difference between something mediocre and something very profitable, often.

There is no specific answer to most of your questinos regarding entry and exit, and sizing etc. It's a big gray area where many people are doing many things, and they learned by doing it, not getting handed a system. Backtesting over-and over to get something viable.
 
Back
Top