Slashdot Mirror


Trading the Markets With FOSS Software?

Robert writes "Along with many other techies, I share an interest in the world of finance (bubble-era stock options pulled me in). Unfortunately, as someone with a strong preference for GNU/Linux as my operating system of choice, I have found that software in this area seems quite sparse. For awhile I have made do with Python, R, Gnumeric, Gnucash and a telephone, along with some small utilities I have written myself. What I would like to know is: what FOSS software do you use for financial analysis, trading, system development, and testing in a Un*x environment? Are there programs you would like to see written or ported? Do any brokerages, data providers, or other services provide good support for we the few? And finally, what commercial entities do you know of that are using FOSS software in their operation?"

16 of 417 comments (clear)

  1. The best tool... by Anonymous Coward · · Score: 5, Funny

    is a dartboard.

    It's unfortunately not available on most distros, but building yourself isn't too hard.
    The dependencies are merely a wall, and Newton's three laws of motion.

  2. EclipseTrader by TheNarrator · · Score: 5, Informative

    EclipseTrader is probably the most advanced open source trading program. It interfaces with some trading platforms and intra-day data feeds. It has several hundred technical indicators. It also is very expandable and easy to write modules for (in Java). I wrote some technical analysis modules for the back-testing system and was fairly impressed with how well it worked as it is based on the very solid OSGI/Eclipse model. I'd say it actually competes fairly well with some of the proprietary trading platforms I have used, especially if you are a Java coder and want to add modules to it to aid in implementing your particular trading style.

  3. Re:Hmmm by DigitAl56K · · Score: 5, Funny

    Did you lose billions of dollars in the stock market? Don't have enough cash to cover your debts? Call the Federal Reserve hotline! You could have $85bn in your checking account by tomorrow, no collateral or responsibility required! 1-800-FED Call now and we'll start a commission to get investors off your back for free!*

    *offer applies with enrollment in triple advantage and is subject to a vote for John McCain

  4. Interactive Brokers's Java trading platform (TWS) by Anonymous Coward · · Score: 5, Informative

    Interactive Brokers has a Java-based
    Trader Workstation ("TWS") and they explicitly support Linux. They offer almost anything you can get anywhere, including mutual funds, stocks, options, futures (commodity & financial), currency, and foreign stocks. Commissions are 10x lower than Charles Schwab if you trade often (if you don't then a minimum monthly commission kicks in).

    TWS is a large, cumbersome Java applet, but it works tolerably well on a fast machine (and there's not much alternative on Linux)

    One annoyance is that they only support jdk 1.5.0_x (not the current 1.6.x), I think because of some concurrency bugs in their code (they claim the newer Java is buggy). However TWS generally does work with the latest jdk, but they won't support it.

    IB's telephone support is sometimes rude, the opposite of "hand holding". I guess they have only a few over-worked support people to keep costs down. Also, they only provide on-line statements and never send physical mail except for annual 1099 tax forms. So, be sure your spouse/executor knows you have an IB account, because if you die there will be no monthly statements to clue them!

    In summary, IB is good, despite their warts. If you trade a few times a month or more, it's worth the hassles.

  5. Re:Hmmm by Anonymous Coward · · Score: 5, Insightful

    Well, you have some facts skewed and some misplaced causality.

    In 1999, Republicans wanted less regulation, causing investment banks to make create financial derivatives to hide risk and gain back their margins and bonuses, where normal banks could now compete.

    Second of all, remember Bush touting the "Ownership Economy" where the sub-primes had artificially elevated the percentage of citizen's who lived in homes they owned?

    Hardly sounds like a left-wing plot of the Democrats altering private banks attitude of lending via mind-control.

    Less regulation, market forces, and human animus(greed, aggression, and fear), which if totally unchecked/balanced by other concerns can spell disaster.

  6. Well, since I develop trading systems on FOSS by Giant+Electronic+Bra · · Score: 5, Informative

    That is the trading system I've spent several years working on is built entirely using Open Source tools and libraries. The system itself is not currently open, but that is a possibility we here certainly look favorably at.

    As far as actual entire free trading systems, there is JavaTraders@googlegroups.com which is a good place to start. Also check out the quickfixj.org site, you will find some things there. There is also an Eclipse plugin which provides some level of GUI.

    Frankly we didn't any of the code in any of those projects (although we do use ta-lib). But as I say, you can do a lot with ActiveMQ, any good open source RDBMS (PostgreSQL,MySQL) and your Enterprise Java framework bits of choice.

    Basically if I were you I'd pick one of the java based projects that is kicking and does roughly what you want, the way you want to do it. For simple basic trading of one or two instrument classes you can probably put together something pretty workable.

    --
    "Malo periculosam, libertatem quam quietam servitutem." -- Jefferson
  7. Bush is still culpable by tacokill · · Score: 5, Insightful

    Say what you want about the origins of the problem but there is no doubt whatsoever that regulation of securities (via the SEC) has been totally and 100% completely absent during all of this.

    That, most definitely, happened on Bush's watch. The "laissez-faire" philosophy of the republicans sounds and looks a lot like Hoover right now. They have, literally, let Wall Street run itself. And you can see the end result on the front pages everyday. Whats the saying? Power corrupts and absolute power corrupts absolutely.

    Look, I am no regulation lover but even the staunchest of conservative economists recognize free markets must have some regulation to insure a fair playing field. Under this administration -- there has been NONE.

    Do you realize that many firms were allowed to leverage up 30 to 1? Let me break down what that means for the /. crowd. Say you have a $10 watch. You go to a pawn shop for a loan and they loan you what? I'd say about $5 or so. Certainly something less than the value of the watch, right? Well, on Wall Street lately, they've been getting $300 loans based on that $10 watch.

    That is totally fucked up and should have never happened. End of story.

  8. Re:Hmmm by sonsonete · · Score: 5, Funny

    Not to mention that the United States is now the largest sponsor of Manchester United.

    --
    "Folks bent on reinventing the wheel should understand that if it's not round, it ain't a wheel." - Jonah Goldberg
  9. Re:Hmmm by stoolpigeon · · Score: 5, Insightful

    Read this 2003 NY Times article about Republican efforts to increase regulation of Fannie Mae and Freddie Mac. There is plenty of blame to go around. Here's a little snippet from the article:
      Among the groups denouncing the proposal today were the National Association of Home Builders and Congressional Democrats who fear that tighter regulation of the companies could sharply reduce their commitment to financing low-income and affordable housing.

    ''These two entities -- Fannie Mae and Freddie Mac -- are not facing any kind of financial crisis,'' said Representative Barney Frank of Massachusetts, the ranking Democrat on the Financial Services Committee. ''The more people exaggerate these problems, the more pressure there is on these companies, the less we will see in terms of affordable housing.''

    Representative Melvin L. Watt, Democrat of North Carolina, agreed.

    ''I don't see much other than a shell game going on here, moving something from one agency to another and in the process weakening the bargaining power of poorer families and their ability to get affordable housing,'' Mr. Watt said.
     
    I'm not a proponent of either party - and so I think it makes it easier to see that they are both grossly incompetent for the most part.

    --
    It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
  10. Re:Let me save you the trouble by Xugumad · · Score: 5, Informative

    Areed. I spent 3 months trying to find a good solution. If you've got buckets of money, NxCore ( http://www.nanex.net/NxCore/NxCore.htm - prices start at $500/month) and any of the brokers that support a FIX API (for which you can expect to pay a hefty fee, too; Interactive Brokers (IB - http://www.interactivebrokers.com/ ) for example charge a one time $500 fee, OANDA ( http://www.oanda.com/ ) charge $600 for the first two months then an ongoing subscription fee if you trade $12mil/month or something).

    For those people not wanting to pour money into it, as good as you can get is Interactive Broker's Trader Workstation (TWS), and JBookTrader (http://code.google.com/p/jbooktrader/) or a custom trading platform that talks to their API. TWS is a pain that lacks automated login (for security reasons) and auto-exits every 24 hours (for... err... security reasons?), but it gets the job done. Data feed can be an issue still, though; IB offer up to 100 symbols at a time, and a basic historical data service, but some people dislike the fact they drop price ticks during busy market times (over 10 prices per second) and the historical data service is paced so you can only do a limited of number of requests (about one every ten seconds I believe).

    In short though, AC is right; use Windows, it may well be less painful. Really.

  11. Re:Hmmm by Hal_Porter · · Score: 5, Funny

    Maybe Man U can get Uncle Sam to assign an Apache gunship to defend their goal during matches. God knows they need it.

    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  12. Re:doofus by Rich0 · · Score: 5, Interesting

    All the little stockholders at AIG are getting the shaft.

    Uh, I think that was a foregone conclusion when they hired inept management.

    It was essential that every stockholder in AIG lose virtually everything they invested. Otherwise it becomes profitable to mismanage your company and let Uncle Sam buy you out.

    I think that some of these resuces were necessary for the good of the greater economy. Sure, they shouldn't be necessary, but regulators messed up and now for the sake of not collapsing into a depression we need to clean up.

    If I were in charge the only thing I'd do differently when doing bailouts like these would be:

    1. Company is 100% taken over.
    2. Stock is declared void. Stockholders get a 1-time eminent domain payment of (value of company assets)-(cost to taxpayers for bailout)/(# shares outstanding). Frankly the stockholders should be happy they don't end up owing money which is what the math certainly will work out to.
    3. Corporate officers arrested and face heavy criminal penalties. Costing the taxpayers billions of dollars needs to be made a serious crime. It is certainly worse than robbing the corner store.
    4. Government runs company in such a way to preserve the general economy.
    5. Eventually company is either dissolved or IPO'ed - with all proceeds going to taxpayers.

    If this were how bailouts worked you wouldn't see too many executives asking for them.

    Don't get me wrong - the preference is in general to let companies just go bankrupt and not interfere. But, if interference is needed for the greater good than this is how it should be done.

  13. Predicted in 99 by copponex · · Score: 5, Informative

    Interesting speech from Senator Dorgan when the bill, Financial Services Modernization Act, was being discussed '99. Those who don't know history...

    "I remember a couple of circumstances that existed more recently. I was not around during the bank failures of the 1930s. I was not around for the debate that persuaded a Congress to enact Glass-Steagall and a range of other protections. But I was here when, in the early 1980s, it was decided that we should expand the opportunities for savings and loans to do certain things. And they began to broker deposits and they took off. They would take a sleepy little savings and loan in some town, and they would take off like a Roman candle. Pretty soon they would have a multibillion-dollar organization, and they would decide they would use that organization to park junk bonds in. We had a savings and loan out in California that had over 50 percent of its assets in risky junk bonds.

    Let me describe the ultimate perversion, the hood ornament on stupidity. The U.S. Government owned nonperforming junk bonds in the Taj Mahal Casino. Let me say that again. The U.S. Government ended up owning nonperforming junk bonds in the Taj Mahal Casino in Atlantic City. How did that happen? The savings and loans were able to buy junk bonds. The savings and loans went belly up. The junk bonds were not performing. And the U.S. Government ended up with those junk bonds.

    Was that a perversion? Of course it was. But it is an example of what has happened when we decide, under a term called modernization, to forget the lessons of the past, to forget there are certain things that are inherently risky, and they ought not be fused or merged with the enterprise of banking that requires the perception and, of course, the reality--but especially the perception--of safety and soundness.

    Last year, we had a failure of a firm called LTCM, Long-Term Capital Management. It was an organization run by some of the smartest people in the world, I guess, in the area of finance. They had Nobel laureates helping run this place. They had some of the smartest people on Wall Street. They put together a lot of money. They had this hedge fund, unregulated hedge fund. They had invested more than $1 trillion in derivatives in this fund--more than $1 trillion in derivatives value.

    Then, with all of the smartest folks around, and all this money, and an enormous amount of leverage, when it looked as if this firm was going to go belly up, just flat out broke, guess what happened. On a Sunday, Mr. Greenspan and the Federal Reserve Board decided to convene a meeting of corresponding banks and others who had an interest in this, saying: You have to save Long-Term Capital Management. You have to save this hedge firm. If you don't, there will be catastrophic results in the economy. The hit will be too big.

    You have this unregulated risky activity out there in the economy, and you have one firm that has $1 trillion in derivative values and enormous risk, and, with all their brains, it doesn't work. They are going to go belly up. Who bears the burden of that? The Federal Government, the Federal Reserve Board.

    We have the GAO doing an investigation to find out the circumstances of all that. I am very interested in this no-fault capitalism that exists with respect to Long-Term Capital Management. Who decides what kind of capitalism is no-fault capitalism? And when and how and is there a conflict of interest here?

    The reason I raise this point is, this will be replicated again and again and again, as long as we bring bills to the floor that talk about financial services modernization and refuse to deal with the issue of thoughtful and sensible regulation of things such as hedge funds and derivatives and as long as we bring bills to the floor that say we can connect and couple, we can actually hitch up, inherently risky enterprises with the core banking issues in this country.

    I hear about fire walls and affiliates, all these issues. I probably know less about them than some others;

  14. Yes, I do realize it by tacokill · · Score: 5, Informative

    Leverage (aka: debt) is key to our economic model. However, that leverage is carefully managed.

    Management of the leverage is what is missing here. NO FIRM should be allowed to leverage up 30:1. (30x your collateral)

    You are comparing apples and oranges.

    And since you went there with LTCM....allow me to quote you a figure, "At the beginning of 1998, the firm had equity of $4.72 billion and had borrowed over $124.5 billion with assets of around $129 billion. It had off-balance sheet derivative positions with a notional value of approximately $1.25 trillion"

    Management of leverage was obviously missing there. 1.25 trillion? That is absolutely totally fucking insane. But because Merriweather was a "smart guy" --- the investment banks let him do this. And it put the entire system at risk.

    That's not supposed to happen. Ever. Yet it did. Do we learn nothing from history?

  15. Re:Hmmm by windsurfer619 · · Score: 5, Insightful

    The federal reserve isn't owned by the US taxpayers. It's a private company.

  16. Re:The NYSE runs linux by pravuil · · Score: 5, Informative

    That's nice, but I think he's more interested in analysis and management tools rather than actually running a stock market...

    I think you're right. Here's a list of apps from something I just googled.