Thursday, August 16, 2012

Renko Backtests

Exotic bar types, as NinjaTrader likes to call them, create unique challenges when backtesting strategies. The primary problems is that the backtests are usually bogus. The trader often has no idea that the profitable backtest calculated from errant data.

Renko bars form based on the order of incoming ticks to create specific box sizes. Say, for example, that a trader creates a box size of 5 pips. If the price rises 5 pips from the close price of the last Renko bar, then the chart creates a new bar 5 pips tall. Every 5 pip increment, whether up or down, draws a new Renko bar.

Using increments that easily fall within normal market gaps creates the false impression of trade-able prices where none existed. Minor news events frequently result in 5-10 pip market gaps. In the case of the 10 pip gap, a box size of 5 pips creates 2 Renko bars. The two bars do nothing to communicate the fact that the prices never existed. Their presence merely indicates the direction of a move and eliminates the idea of time altogether. Time, or more specifically the absence of it, strikes me as rather important.

Small box sizes more commonly lead to questions about wildly inaccurate backtests. I received two questions last week inquiring why NinjaTrader showed $19,000 returns in a backtest, but the same forward test lost nearly an identical amount.

The backtests rely on a selected data set to generate the Renko bars used for testing. Users nearly always overlook the data source option in NinjaTrader. It defaults to one minute charts. One tick bid is the only type of data that will form perfectly accurate charts. Any other increment risks creating Renko bars that never existed.

Screenshot of settings to create an accurate Renko backtest
Change your backtest settings to use not only Renko charts, but also Bid data.
Take an extreme example of one minute chart data drawing Renko bars with a 3 pip box size. Say that the over-all height of the bar is 10 pips, the low is 1 pip from the open and the M1 bar closes 8 pips higher. How many Renko boxes does the chart need to draw? The correct answer is that there is no way of knowing.

Examples:
  • The market goes down 1 pip, then up 10 pips and settles at the close price. This draws 3 total box with one box in progress.
  • The market goes down 1 pip, then up 3 pips, then down 3 pips, then up 10 pips. This draws 5 boxes total with one box in  progress.
  • The market does down 1 pip, then up 3 pips, then down 3 pips, then up 3 pips, then down 3 pips, then up 10 pips. This draws 7 boxes total with one box in progress.
As you can see, we have no way of knowing which of the above options is correct, if any of them are correct at all. Summarizing price over time inevitably papers over what happens in the middle (information entropy). NinjaTrader has no option but to guess the unknowable.

It's done in good faith, but NinjaTrader is essentially making up Renko data to cover up gaps in the price data. When you're running a backtest, the whole point of the exercise is to eliminate guessing and deliver solid answers.

Most people make the hand waving assumption that it all averages out in the end. The two clients asking me this week about why their Renko backtests came out so screwy, and the reason that I'm writing this post, is that the hypothetical versus real performance was as different as night from day. It most certainly does not average out. Rather, it introduces so many errant points as to make the tests worthless.

Don't make assumptions in your backtest. Get tick data and, if you're using Renko bars, make sure to set the test up properly.

Swiss banks give up names to end DOJ probe


Swiss banks are turning over thousands of employee names to U.S. authorities as they seek leniency for their alleged role in helping American clients evade taxes, according to lawyers representing banking staff.
At least five banks supplied e-mails and telephone records containing as many as 10,000 names to the U.S. Department of Justice, according to estimates by Douglas Hornung, a Geneva- based lawyer representing 40 current and former employees of HSBC Holdings Plc’s Swiss unit,Credit Suisse Group AG (CSGN) and Julius Baer Group Ltd. (BAER) The data handover is illegal, said Alec Reymond, a former president of the Geneva Bar Association, who is representing two Credit Suisse staff members.
“The banks are burning their own people to try and cut deals with the DOJ,” said Hornung. “This violation of personal privacy is unprecedented in the Swiss banking industry.”
Swiss banks want to settle a U.S. tax-evasion probe after the Justice Department indicted Wegelin & Co. on Feb. 2 for allegedly helping customers hide money from the Internal Revenue Service. Credit Suisse, HSBC and Julius Baer, which have said they expect to pay fines to resolve the tax matter, are handing over data to mollify the U.S., according to Hornung.
Credit Suisse said the Swiss government authorized the delivery of staff names and that the “large majority” of employees have nothing to fear. Julius Baer and Zuercher Kantonalbank also said they received authorization. HSBC said it has delivered documents and is cooperating with the U.S.

The Global (Not Euro-Zone) Crisis

Europe’s failure twice plunged the world into war. In today’s globalized economic world, Europe’s failure to resolve its financial crisis could plunge the world into economic chaos. This is a global crisis — not a euro-zone crisis — and we must take international action to deal with it.

http://www.nytimes.com/2012/08/16/opinion/the-global-not-euro-zone-crisis.html

Wednesday, August 15, 2012

Russ Wasendorf Sr. indicted


Peregrine Financial Group Inc. CEO Russ Wasendorf Sr. could face up to 155 years in prison if convicted on all counts, prosecutors said. His attorney didn’t immediately return a phone message Monday, and the date for an arraignment, where Wasendorf will enter a plea, has not been set. Peregrine operated as PFGBest.
Wasendorf, 64, a major player in Chicago’s futures industry, was arrested last month while hospitalized in Iowa City following a failed suicide attempt outside Peregrine’s office in Cedar Falls. Authorities said Wasendorf left a detailed suicide note in which he confessed to a 20-year scheme to commit fraud and embezzle customer funds.
For any PFG Best Customer, in case you have not seen this:

Important Message for Customers of Peregrine Financial Group and Peregrine Asset Management - Updated on August 3, 2012

As you aware, PFG filed for liquidation in a U.S. bankruptcy court in Chicago and the U.S. Trustee appointed Ira Bodenstein to act as trustee for PFG and its assets, including customer property. On July 13, the bankruptcy court authorized the trustee to continue to operate PFG's business for a limited time in order to (among other things) prepare and distribute final customer statements, and record transactions related to customer accounts. At this time, it is not clear how long it will take to complete these processes or when the trustee will be authorized to release any funds to customers.
The trustee has established a website, www.PFGChapter7.com, that contains information about the PFG case. The website was created to assist the trustee in providing information to customers and to receive comments or questions from customers. According to the website, the Trustee has not yet determined whether PFG customers will need to prepare a claim form. Customers are encouraged to visit the site regularly for updates from the Trustee regarding customer claims.





Tuesday, August 14, 2012

Eurozone endgame - not Armageddon, a blessing

Knight Trading Loss Said To Be Linked To Dormant Software

Once triggered on Aug. 1, the dormant system started multiplying stock trades by one thousand, according to the people, who spoke anonymously because the firm hasn’t commented publicly on what caused the error. Knight’s staff looked through eight sets of software before determining what happened, the people said. Knight, based in Jersey City, New Jersey, hasn’t explained in detail what caused the trading losses, which depleted its capital and led to a $400 million rescue that ceded most of the company to a group of investors led by Jefferies Group Inc. (JEF) The 45-minute delay in shutting down the malfunction has confused some securities professionals, who say that trading programs can typically be disabled instantly.

http://www.bloomberg.com/news/2012-08-14/knight-software.html

Monday, August 13, 2012

Forecasts of economic consequences of a Euro breakup



http://www.marketoracle.co.uk/images/2012/Aug/081112.jpg

Capital flows signal new storm in Europe


Investors are losing confidence in the single currency and seeking havens for their cash outside the euro area asEurope’s debt crisis drags on in its third year. That has forced the Swiss National Bank to buy euros to prevent the franc from appreciating, and prompted the Danish central bank to charge for the use of its deposit facility while yields on U.K. two-year notes are less than 0.14 percent.
“Now there are growing signs that the crisis of confidence in the euro zone has assumed a new dimension,” Kressin wrote. “Whereas initially investors fled to the safety of the euro zone’s core, now they are taking their capital out of the euro zone altogether.”
The Swiss central bank’s sales of the euro to rebalance its reserves are “reinforcing” pressure on the single currency, according to Kressin. Its purchases of top-rated Europeangovernment bonds, particularly bunds, are also forcing down yields on those securities, he said.

Saturday, August 11, 2012

U.S. banks told to make plans for preventing collapse


(Reuters) - U.S. regulators directed five of the country's biggest banks, including Bank of America Corp and Goldman Sachs Group Inc, to develop plans for staving off collapse if they faced serious problems, emphasizing that the banks could not count on government help.
The two-year-old program, which has been largely secret until now, is in addition to the "living wills" the banks crafted to help regulators dismantle them if they actually do fail. It shows how hard regulators are working to ensure that banks have plans for worst-case scenarios and can act rationally in times of distress.
Officials like Lehman Brothers former Chief Executive Dick Fuld have been criticized for having been too hesitant to take bold steps to solve their banks' problems during the financial crisis.

Friday, August 10, 2012

Otmar Issing says Eurozone will break up


BRUSSELS - Former European Central Bank (ECB) chief economist and German central banker Otmar Issing has warned that the eurozone may split up - another voice in the chorus talking about a Greek exit from the common currency.
"Everything speaks in favour of saving the euro area. How many countries will be able to be part of it in the long term remains to be seen," Issing wrote in his latest book, entitled: "How we save the euro and strengthen Europe."

Thursday, August 9, 2012

Out-of-money Greece now prints its own euros


Alas, August 20 is the out-of-money date. September is irrelevant. Because someone else turned off the spigot. Um, the ECB. Two weeks ago, it stopped accepting Greek government bonds as collateral for its repurchase operations, thus cutting Greek banks off their lifeline. Greece asked for a bridge loan to get through the summer, which the ECB rejected. Greece asked for a delay in repaying the €3.2 billion bond maturing on August 20, which the ECB also rejected though the bond was decomposing on its balance sheet. It would kick Greece into default. And the ECB would be blamed.
But the ECB has a public face, President Mario Draghi. He didn’t want history books pointing at him. So the ECB switched gears. It allowed Greece to sell worthless treasury bills with maturities of three and six months to its own bankrupt and bailed out banks. Under the Emergency Liquidity Assistance (ELA), the banks would hand these T-bills to the Bank of Greece (central bank) as collateral in exchange for real euros, which the banks would then pass to the government. Thus, the Bank of Greece would fund the Greek government.
Precisely what is prohibited under the treaties that govern the ECB and the Eurosystem of central banks. But voila. Out-of-money Greece now prints its own euros! The ECB approved it. The ever so vigilant Bundesbank acquiesced. No one wanted to get blamed for Greece’s default.


Read more: http://www.testosteronepit.com/home/2012/8/8/greece-prints-euros-to-stay-afloat-the-ecb-approves-the-bund.html#ixzz235XoK0bz

Tuesday, August 7, 2012

Dark Pools

I picked up Dark Pools by Scott Paterson on Friday evening and finished Sunday afternoon. That ought to say something for the book's readability. I recommend it to anyone that trades, especially equities traders.

The structure of the stock market is far more complicated than I ever expected. Trading at Interactive Brokers, I always noticed that the execution venue would vary between different acronyms like ISLAND, ARCA and BATS. I knew that they were ECNs, but I never really understood what linked them together.


The stock market is not an exchange in the sense of a centralized location where all transactions occur. It is more like a listing entity where public companies go to list their shares. Actual trading occurs on any network plugged into the system.
The "exchange" is really a complex network of networks with varying degrees of favoritism shown to high volume clients.

Electronic Communication Networks ("ECN") originally started in the mid 1980s with the idealistic goal of eliminating the corrupt practices of the NASDAQ floor specialists and market makers. These guys were notorious (and later heavily fined) for colluding to artificially widen spreads on stocks for their own profits. ECNs would cut out the hated middle man while reducing errors, increasing transparency and dramatically decreasing execution time.

As one can imagine, the ECNs took off rather quickly. Not only did they offer much faster execution, but they were also about 60% cheaper to execute a trade.

They corruption that ECNs sought to eliminate inadvertently replaced one problem with another. Networks looking for liquidity offered trading rebates for limit orders that added orders into the system. The setup, which came to be known as maker-taker, created perverse trading incentives for participants. The more trades executed, the more the profits would add up.

Firms sought to become something like Walmart is to wide screen TVs. The more you sell, the more you make. The liquidity providers started fighting aggressively for inside placement of the spread to facilitate ever more trades.

The system spun out of control in two ways. It created a computing arms race where firms focused on purchasing cutting edge technology that shaves microseconds off of calculation time. Firms with the deepest pockets could literally buy an advantage through their computing hardware over the average Joe.

More importantly, the system itself bred its own corruption. The ECNs grew addicted to the liquidity fees. The more trades that fired off, the more money they made. They naturally started catering to their most important clients.

How they did it, though, is what sickens me as a trader. The ECNs started creating order types that were effectively secret. They allowed high speed firms to jump in line over retail chumps using vanilla limit orders. The ECNs offered colocation access at exorbitant fees to give the machines an edge. They allowed the creation of dark liquidity where some players could literally hide orders for execution while others displayed theirs 100% of the time. It makes a complete mockery of the idea of a level playing field.

Artificial intelligence played a big role in how the algorithms operate. What encouraged me, however, was how Patterson chose to wrap up the book. Many of the funds covered near the end start out as relatively small fish working with various types of AI to build predictive trading systems. Their initial results appear encouraging.

One of our biggest projects here is to use various models of fractal markets to build an automated trading system on behalf of the client that I go visit in Ireland so often. Andy and I meet on a near daily basis to discuss our genetic algorithm and how best to encourage the network to behave as we want it to. We are about a month from running our first predictive tests with our in house model. Reading this book encourages me that we are blazing down the right path.

Bernanke Says Economic Data May Mask Individual Suffering


Bernanke didn’t address the outlook for monetary policy or the economy, or expand on the Fed’s Aug. 1 statement. His remarks, focused on economic measurement, will be delivered via prerecorded video.
The 58-year-old Fed chief, a former Princeton professor, said economists should “increase the attention paid to microeconomic data, which better capture the diversity of experience across households and firms.” Also, researchers should “seek better and more-direct measurements of economic well-being, the ultimate objective of our policy decisions.”
He said interesting projects include the Organization for Economic Co-operation and Development’s Better Life Initiative, which aims at measuring quality of life in different countries, and the Gross National Happiness index compiled by Bhutan.

EES: UUP: U.S. Dollar Long-Term Buy Of 2012

Since the Euro's existence, it has been debated by analysts that the U.S. Dollar is losing its place as the only reserve currency in the world. In other words, the age of U.S. Dollar hegemony was coming to an end. Central Banks such as Bank of Russia have started diversifying into reserve currencies other than the U.S. Dollar, most recently theAustralian Dollar. This is the effect of a global sentiment that the U.S. Dollar outlook is extremely bearish. A number of factors including low interest rates, a weakening U.S. economy, a perceived shift to emerging markets by multinational corporations, a rising China and India, and other factors, make the U.S. Dollar look weak-- especially with new choices such as the Euro (FXE), Chinese Renmimbi, and others.

http://seekingalpha.com/article/782881-uup-u-s-dollar-long-term-buy-of-2012

http://www.reddit.com/r/finance/comments/y1x8a/uup_us_dollar_longterm_buy_of_2012_seeking_alpha/