Wilmott Forums - Opensource Trading Plattform

来源:百度文库 编辑:神马文学网 时间:2024/04/29 22:05:33

Forum Navigation: Select WHO'S ON: 07:33 AM General Forum Technical Forum Economics Forum Numerical Methods Forum Trading Forum The Quantitative Finance FAQs Proje... Student Forum Book And Research Paper Forum Software Forum Careers Forum Jobs Board Events Board Brainteaser Forum Off Topic Forum and Website Bugs and Suggesti...

new topic
search
bookshop
news
help
file share
audio visual
articles
blogs
wiki
forums
home
login

FORUMS >Trading Forum
Topic Title: Opensource Trading Plattform
Created On Fri Apr 13, 07 12:15 PM Topic View: Branch View Threaded (All Messages) Threaded (Single Messages) Linear


Fri Apr 13, 07 12:15 PM

Opensource Trading Plattform - should there be one? Would you contribute?
Here *1 for example is a framework for hooking up to Interactive Brokers and implementing some strategies. Most opensource apps seem to focus on simple charting and not on sophisticated quantitative trading. Of course there could be are many more areas besiders interfacing to the broker, like backtesting, riskmanagement, reporting, etc. So why not share the framework and focus on the real deal (strategies and decisions). The problem is probably that no one would agree how the architecture should look like. Thoughts and ideas?
*1 http://sourceforge.net/projects/jsystemtrader/
-------------------------
"Our criticism of the accepted classical theory of economics has consisted not so much in finding logical flaws in its analysis as in pointing out that its tacit assumptions are seldom or never satisfied, with the result that it cannot solve the economic problems of the actual world.”
Keynes, The General Theory of Employment, Interest and Money
 Reply    Quote    Top    Bottom
Sat Apr 14, 07 12:15 AM

do not waist your time
ojts
Edited: Sat Apr 14, 07 at 12:15 AM by nikol
 Reply    Quote    Top    Bottom
Sat Apr 14, 07 10:43 AM

Looks very good. Thanks.
Quote
* the gathering of raw data over the internet
* the recognition of trading signals
* a visualisation module and
* modules to connect to the programmatic interfaces of trading platforms like banks.
My question is: is even possible to divide the conceptual framework from the architecture? I'm not sure about this, but I suppose not. Therefore I'm looking for design patterns for these kinds of systems. How do you organize your trades, riskmanagement, execution, backtesting?
-------------------------
"Our criticism of the accepted classical theory of economics has consisted not so much in finding logical flaws in its analysis as in pointing out that its tacit assumptions are seldom or never satisfied, with the result that it cannot solve the economic problems of the actual world.”
Keynes, The General Theory of Employment, Interest and Money
Edited: Sat Apr 14, 07 at 10:44 AM by yabbadabba
 Reply    Quote    Top    Bottom
Sat Apr 14, 07 04:19 PM

Complexity of organization depends on current volume/profit level.
At the beginning when diversity of traded product is limited, the accounting is simple and canbe done even with excel.
Later when you have some cash to spare you can buy more "professional" systems.
All is dictated by cash you have. Either coming from your trades, either from investors (including yourself).
 Reply    Quote    Top    Bottom
Sat Apr 14, 07 10:46 PM

The point is to build an opensource plattform from scratch that with which one can design, test and execute complex strategies. Professional systems are only code aswell and aslong the algorithms and architecture is open source it doesn't make a difference. As far as I know even many hedge funds rely on their handcoded stuff, instead of bundling ideas.
-------------------------
"Our criticism of the accepted classical theory of economics has consisted not so much in finding logical flaws in its analysis as in pointing out that its tacit assumptions are seldom or never satisfied, with the result that it cannot solve the economic problems of the actual world.”
Keynes, The General Theory of Employment, Interest and Money
 Reply    Quote    Top    Bottom
Mon Apr 16, 07 03:33 PM

An interesting open software project is marketcetera. Look at marketcetera.com. I have not installed it, but the information looks very interesting.
 Reply    Quote    Top    Bottom
Mon Apr 16, 07 10:41 PM

Quote
Originally posted by: yabbadabba
The point is to build an opensource plattform from scratch that with which one can design, test and execute complex strategies. Professional systems are only code aswell and aslong the algorithms and architecture is open source it doesn't make a difference. As far as I know even many hedge funds rely on their handcoded stuff, instead of bundling ideas.
I can imagine how this happened. You get an idea. The idea you paper tested with MatLab or even excel. Since cash is limited , the only resource you have is your hands.
So, what you do? You build simple accounting system which is able to track your PnL and allows simplistic reconciliation with broker/clearing. On top of that you build your risk system, which must also control your settlements and deliveries.
When your volume grows you upgrade modules and nothing else. You do economical style of business and keep cost under control. Otherwise you loose more than you earn and loose all your business, even if the strategy is good.
No consultancy. Do everything yourself. Especially if you are not a successful serial entrepreneur.
 Reply    Quote    Top    Bottom
Wed Apr 18, 07 02:26 PM

There's a long list of mostly free/open-source TA and trading tools athttp://ta-lib.org/hdr_lnk.html . In addition to jsystemtrader and ojts, some of the more interesting packages include:
http://mov.sourceforge.net/index.html
http://www.geniustrader.org/
http://itrade.sourceforge.net/
I've not studied these in depth, but none of them looks like the Holy Grail of OOS trading platforms.
Quote
Originally posted by: yabbadabba
How do you organize your trades, riskmanagement, execution, backtesting?Five comments:
1. Backtesting, paper trading, and live trading are all similar activities with some differences at the level of interfaces to the outside world and control logic. All three contain a live or simulated control/feedback loop in which market and portfolio state data maps to trading actions which maps back to updated portfolio state data. A proper backtest needs to use the same trading strategy and risk management logic as live trading. The key differences are two-fold. First is the high-level control logic -- live trading is controlled by the external timing of market events whereas backtesting runs as fast as the engine can serve up and process the next piece of historical data. Second, backtesting and live trading do have their own special coding issues (backtesting requires a test management system and live trading needs an order management/reconciliation system interfaced to outside systems).
2. I wouldn't separate risk management from trading strategy. Or should I say that I wouldn't enforce a separation of these. The trading strategy decision to buy or sell a given instrument at a given time is not separable from the risk management decisions of how much or to buy or sell, what stops to enforce, or how to diversify. A highly profitable trade strategy can easily be made into a long-term loser by the wrong risk management. Often, the expected gain on a trade is not independent of the expected risk on the trade.
3. Tricky Challenge #1: UI issues are what make the project hard. The core trading/execution loop and PnL calculation doesn't need to be that hard. Putting the whole thing in a nice visual environment with strategy building blocks, pretty graphs of backtest results, and easy-to-use strategy parameter knobs makes things interesting.
4. Tricky Challenge #2: Recursion would make the system really interesting. How can we enable a trading strategy, in making the decision at one time point, call the backtest engine to explore alternative trading decisions. In a genetic algorithm trading strategy, the evolved offspring agent at time T might be backtested against historical data from t5. Tricky Challenge #3: Real-time trading is also a huge challenge on multiple levels. First, the market's state can change during the trading system's deliberation time. Second, the data is dirtier. Third, the trading system will have more market impact (every instrument is illiquid at a fine enough timescale). Fourth, hard real-time programming methods are a specialty unto themselves that don't play well with heavily layered and abstracted APIs, IDEs, and OSes.
-------------------------
"It often happens that a player carries out a deep and complicated calculation, but fails to spot something elementary right at the first move." -- grandmaster Alexander Kotov --inscribed on gift chess sets given by Amaranth hedge fund.
Edited: Wed Apr 18, 07 at 02:27 PM by Traden4Alpha
 Reply    Quote    Top    Bottom
Wed Apr 18, 07 03:20 PM

Thanks for the excellent post. After reading it I come to the conclusion that it would be extremely hard to decouple the architecture from the business processes (analysis, trading style, etc.). The standard software-engineering theory would be: you have a customer and you request a prioritized tree of requirements (RE) and uses cases (UC). Then you build a software system which satisfies RE + UC, where the designer is distinct from the customer. In this case the designer would probably be also the customer which changes many things.
The more I think about it making an opensource plattform with a high standard is not feasible. Opensource works especially will if a rather big team can easily agree on the REs & UCs & architecture. Also the time it takes for an opensource app to become robust and stable is imense. It would be interesting to look at some Open vs Closed projects in different domains. For example with games, probably only a very small fraction of projects have been successful. It would be very hard to find dedicated engineers if they don't use the product itself, which is the likely to be the case with a trading plattform. Also the opportunity costs would be very high, because selling a high-class plattform should easily make lots of money. If you look at programs like Tradestation, Metastock and Wealthlab there is lots of ground to cover, conceptually and technically.
-------------------------
"Our criticism of the accepted classical theory of economics has consisted not so much in finding logical flaws in its analysis as in pointing out that its tacit assumptions are seldom or never satisfied, with the result that it cannot solve the economic problems of the actual world.”
Keynes, The General Theory of Employment, Interest and Money
 Reply    Quote    Top    Bottom
Wed Apr 18, 07 06:18 PM

Quote
Originally posted by: yabbadabbaThe standard software-engineering theory would be: you have a customer and you request a prioritized tree of requirements (RE) and uses cases (UC). Then you build a software system which satisfies RE + UC, where the designer is distinct from the customer.
You do need a requirements document and use cases, but you also need the customer and the designer to be constantly interacting. The classic mistake is to consider the RE and UC to be fixed documents when in fact they can and should change over the life of the project. The challenge in coding is to do it in a way so that when the customer decides that everything they told you was wrong and they want to do things another way, you minimize the amount of work needed to react to this.
Quote
The more I think about it making an opensource plattform with a high standard is not feasible. Opensource works especially will if a rather big team can easily agree on the REs & UCs & architecture.
I've never seen an open source project do that. There is a Darwinian element in open source which is useful. You have lots of people working on different things. Only a few will win. I suspect that most of the trading platforms that people have mentioned will turn out to be also-rans, but that one or two of them will be the de facto standard that everyone works off of.
Quote
Also the time it takes for an opensource app to become robust and stable is imense.
The time it takes for any application to become robust and stable is immense. Part of the trick in successful open source applications is to start out in a niche where stability and robustness are not extremely high priorities. This gives the application time to mature. The thing that open source applications can do that close-source can't involves mash-ups. For example, in the last 15 minutes, I found out that itrade has a python based stock display widget which I will find some way of using. It may take me a week or so to figure out if this is feasible and to actually implement something.
With closed-source, you'd have to spend months with lawyers to even get started. Large companies are starting to realize this. About a week and a half ago, I bought a Nokia 800. I downloaded the SDK, found a bug in the SDK (the SDK doesn't recognized if you are on a 64-bit machine), put it into bugzilla, and Nokia is now fixing it.
-------------------------
Code Janitor
Edited: Wed Apr 18, 07 at 06:20 PM by twofish
 Reply    Quote    Top    Bottom
Wed Oct 24, 07 01:20 PM

It seems the open-source approach florishes when there is a wide technically-skilled user base who can justfy fixing bugs and and adding improvents in an open-source project as a integral part of their job or hobby. Such areLinux Kernel andphpBB. Some open-source projects are commercial and are financed from support and custom development contracts, e.g.MySQL andRed Hat Linux.
In all of the above cases, successful open-source projects have a wide user base with extensive IT skills who prefer solid architecture and reliability over ease of use and extensive intuitive user interface.
Perthaps, the closest in terms of the prospective user base open-source project isQuantLib. It has solid architecture, thorough error reporting and is flexible enough to handle recalculations driven by multiple real-time data feeds. Where it lacks is documentation, especially beginners' how-to's and, and simple-to-use interface to Excel. Because of these limitations, even a simple calculation leads to a long process of trial and error for a new user. As you can imagine, cash-rich financial organisations prefer to steer clear of QuantLib and either use proprietary libraries or licence commercial libraries, which may not even be as feature rich but offer beginners' guides, ease of use and support for a few thousand buck per user per year.
 Reply    Quote    Top    Bottom
Fri Oct 26, 07 06:01 PM

I would not suggest open source projects as a base or even as a reference if you want to build a modern financial application with a good success story, unless it is a very well defined quantitative library (perhaps as QuantLib). The two most important aspects of successful and scalable software applications today are:
1. Very well defined system boundaries == to scale
2. Sophisticated user experience == to get clients
Most (finance/trading) open source projects that I come across are very good intellectual exercises and have a lot of interesting ideas, but are lacking these two fundamental aspects, or have only one of them.
Remember, in the times of Web 3.0, the typical development cycle of a successful web application will be less than a year and user experience will be the key to your success.
-------------------------
"Sometimes one pays most for the things one gets for nothing." -- A Einstein
www.macroaxis.com
 Reply    Quote    Top    Bottom
Fri Oct 26, 07 09:43 PM

I think the problem comes down to what one understands as trading. Because sophisticated users will always be as close to a computer language as possible, the degree of commonality will be very low. As the approach to trading gets more sophisticated the level of individuality will increase.
In my view a trading plattform would come close to a CAS library, such as the ones in Matlab. I myself would employ computer language orientated tools, e.g. a scripting language as a gluing language. It's actually quite the same principle as with CAS. A project I find worth mentioning is the commercial oneStar-P.
So I think a good idea for an OS trading library would be to build a module for Octave or R.
-------------------------
"Our criticism of the accepted classical theory of economics has consisted not so much in finding logical flaws in its analysis as in pointing out that its tacit assumptions are seldom or never satisfied, with the result that it cannot solve the economic problems of the actual world.”
Keynes, The General Theory of Employment, Interest and Money
Edited: Fri Oct 26, 07 at 09:45 PM by yabbadabba
 Reply    Quote    Top    Bottom
Sun Oct 28, 07 01:20 AM

Quote
Originally posted by: yabbadabba
So I think a good idea for an OS trading library would be to build a module for Octave or R.
http://www.itp.phys.ethz.ch/econophysics/R/index.html
Quote
Rmetrics is the premier open source solution for teaching financial market analysis and valuation of financial instruments. With hundreds of functions build on modern methods Rmetrics combines explorative data analysis and statistical modeling. Rmetrics is embedded in R, both building an environment which creates for students a first class system for applications in statistics and finance.
-------------------------
"Our criticism of the accepted classical theory of economics has consisted not so much in finding logical flaws in its analysis as in pointing out that its tacit assumptions are seldom or never satisfied, with the result that it cannot solve the economic problems of the actual world.”
Keynes, The General Theory of Employment, Interest and Money
 Reply    Quote    Top    Bottom
Sun Nov 25, 07 06:43 PM

You better check out ActiveQuant at http://www.activequant.org
Disclaimer: yes, i am lead developer of it.
-------------------------
http://www.activequant.org