Monday, November 24, 2014
Wednesday, November 19, 2014
Sunday, June 15, 2014
Saturday, May 10, 2014
Collection of C++ Resources
how to debug c++ program before main()
set a break at _start()
- 'start'
- The name of the main procedure can vary from language to language. With C or C++, the main procedure name is always main, but other languages such as Ada do not require a specific name for their main procedure. The debugger provides a convenient way to start the execution of the program and to stop at the beginning of the main procedure, depending on the language used.
- The ‘start’ command does the equivalent of setting a temporary breakpoint at the beginning of the main procedure and then invoking the ‘run’ command.
- Some programs contain an elaboration phase where some startup code is executed before the main procedure is called. This depends on the languages used to write your program. In C++, for instance, constructors for static and global objects are executed before main is called. It is therefore possible that the debugger stops before reaching the main procedure. However, the temporary breakpoint will remain to halt execution.
- Specify the arguments to give to your program as arguments to the ‘start’ command. These arguments will be given verbatim to the underlying ‘run’ command. Note that the same arguments will be reused if no argument is provided during subsequent calls to ‘start’ or ‘run’.
- It is sometimes necessary to debug the program during elaboration. In these cases, using the start command would stop the execution of your program too late, as the program would have already completed the elaboration phase. Under these circumstances, insert breakpoints in your elaboration code before running your program
Dynamic Memory Management : Quick Reference
In C++, the new() and delete() operators provide built-in language support for dynamic memory allocation and deallocation. This feature has several benefits:- – Reduces common programmer errors: it is easy to forget to multiply the number of objects being allocated by sizeof when using malloc(), e.g., // oops, only 2 1/2 int’s! int *a = (int *) malloc (10);
- – Enhances source code clarity: generally, there is no need to: (1) declare operator new() and delete(), (2) explicitly use casts, or (3) explicitly check the return value.
- – Improves run-time efficiency: (1) users can redefine operator new() and delete() globally and also define them on a perclass basis and (2) calls can be inlined.
May 2014: Media coverage of High Freq Trading Stories after 'Flash Boys'
Chairman Mary Jo White Stops Short of Saying There Is an Unlevel Playing Field
On high-frequency trading, Rep. Carolyn Maloney (D., N.Y.) said she is concerned high-speed firms subscribe to data feeds that are significantly faster than data feeds that are available to the public, allowing them to detect trades before other investors can see them and take advantage of the information.
Ms. White said she doesn't believe the ability of high-frequency firms to take advantage of fast-moving market information unavailable to other investors meets the legal definition of insider trading.
"As I understand the question, as it's been described, it is not unlawful insider trading," she said, in response to questions from Mr. Garrett. She added there was "confusion" on the difference between early access to order information and certain firms' ability to "more quickly react to... public information."
NYSE to Curtail Order Types Amid Debate Over Their Fairness
- “I am surprised Sprecher took such a strong leadership role in resolving the order type controversy,” Bodek said by e-mail today. “I applaud his efforts and hope other exchanges will follow.”
- Eric Ryan, an NYSE spokesman, declined to provide further details about the order types that might be eliminated.
ICE Seeks to Reduce Stock Order Types at NYSE
- As a first step toward "unilaterally reducing the excessive complexity," Mr. Sprecher said the exchange plans to apply to the Securities and Exchange Commission to eliminate roughly one dozen existing order types, without singling out which order types would be targeted for elimination.
- Others said the types of orders the exchange ultimately removes will be as telling as the announcement itself. A 2013 report by Rosenblatt Securities found that many order types are little used.
- "It's hard to know how consequential this will be until you see which order types they are going to get rid of," said Justin Schack, Rosenblatt's head of market structure.
Goldman, Barclays, Credit Suisse Draw High-Speed Trading Scrutiny
- Dark pools accounted for an estimated 14% of U.S. stock-trading volume in March 2014, according to Rosenblatt, which tracks trading activity.
- Goldman has held discussions over the future of its private stock-trading venue, called Sigma X, and in conversations with other market participants in recent months had broached the subject of shutting it down,
- Barclays's venue, known as LX, is among the largest in the U.S., trading an average of 110 million shares a day in March, or 11.4% of all dark-pool volume, according to Rosenblatt Securities Inc., which tracks trading activity.
- Credit Suisse's dark pool, Crossfinder, another popular alternative-trading venue, doesn't report its volumes.
Friday, April 25, 2014
Apr 2014:Media coverage of High Freq Trading Stories after 'Flash Boys'
- HFT - WSJ op-ed ; HFT Hyperbole [Apr 2014 ]
- "How do we feel about high-frequency trading? We think it helps us. It seems to have reduced our costs and may enable us to manage more investment dollars. We can't be 100% sure"
- "ICE Chief Executive Officer Jeff Sprecher, has been a vocal critic of the overall stock market, saying it is too complicated and rife with conflicts of interest. Katsuyama would not comment on whether ICE had tried to buy his company. But he did say: "We're very aligned in philosophy and I have only good things to say about Jeff ".
"why did the market in any given stock dry up only when he was trying to trade in it? To make his point, he asked the developers to stand behind him and watch while he traded. “I’d say: ‘Watch closely. I am about to buy 100,000 shares of AMD. I am willing to pay $15 a share. There are currently 100,000 shares of AMD being offered at $15 a share — 10,000 on BATS, 35,000 on the New York Stock Exchange, 30,000 on Nasdaq and 25,000 on Direct Edge.’ You could see it all on the screens. We’d all sit there and stare at the screen, and I’d have my finger over the Enter button. I’d count out loud to five.
. . .
“ ‘One. . . .
“ ‘Two. . . . See, nothing’s happened.
“ ‘Three. . . . Offers are still there at 15. . . .
“ ‘Four. . . . Still no movement. . . .
“ ‘Five.’ Then I’d hit the Enter button, and — boom! — all hell would break loose. The offerings would all disappear, and the stock would pop higher.”
The exchange in question...
“What do you use to price trades in your matching engine on Direct Edge?” Mr. Katsuyama asked Mr. O’Brien.
“We use the direct feeds,” Mr. O’Brien said.
Mr. Katsuyama, whose IEX dark pool markets itself as a haven for investors against high-speed traders, later brought up the issue again. “You use the SIP to price trades on Direct Edge,” he said. “That is not true,” Mr. O’Brien said.
- Via Nanex, Between 8:00 and 9:20 on February 4, 2014, in the stock of The WhiteWave Foods Company (symbol WWAV, market cap $4 Billion), one or more High Frequency Trading (HFT) algos, generated 2.04 million top of book orders at Direct Edge. Most of these affected the NBBO (National Best Bid/Offer) hundreds of times per second. There were 3 trades
- "HFT lobbyist group Modern Markets Initiative (MMI). In the article, MMI attempts to discredit the Wall Street Journal's A Suspect Emerges in Stock-Trade Hiccups: Regulation NMS, and seizes the opportunity to "revisit some commonly held misconceptions about electronic markets and high frequency trading (HFT)". We'll seize the opportunity to point out some intellectual dishonesty. "
- "Sophisticated traders have been aware of CME's order-latency issue for years and have incorporated the information into their trading strategies, according to an official with Jump Trading LLC, a big Chicago high-frequency company.Officials with Virtu Financial LLC, a high-speed trading firm in New York, view a slight head start as good for the overall market, according to a person familiar with their thinking."
- "Under an arrangement in use since the 1980s, discount brokerages sell most of their clients' orders to wholesale companies, which then trade against the orders without sending them directly to traditional stock exchanges. The wholesalers capture tiny profits on many of the trades, using superfast computers with complex algorithms to match orders."
- "This practice is called 'payment for order flow', and it's not new to the market. Bernie Madoff used to do it by paying other brokers a penny per share. Then his firm would use that to trade with a better understanding price."
- HFT - Should high-frequency trading be regulated? Washington Post Article Apr 6 2014
- "What does this mean about regulation? To me, this means first that the state of knowledge is sufficiently ambiguous that at the current time I’m not persuaded that there is a case for regulation. But second, it also suggests a case for experimentation — which is to say that there may be a market for different markets, some of which permit HFT and some that don’t. If HFT increases market efficiency, then you’d expect parties to gravitate to those markets. If not, then you’d expect the opposite"
- Larry Tabb of Tabb Group: ‘No, Mr. Lewis. The Markets Are Not Rigged’
- Takeaways : Now, is there a single best way to execute an order? Are brokers perfect? Are there conflicts in the pricing structure of trades that may push brokers to trade off-exchange in their own dark pool versus at a lit exchange? Absolutely. That said, investors, brokers, and third-party measurement firms are trying to help better analyze the problems, help investors shift flow toward better performing brokers and algorithms, and help traders better understand where there is leakage.We have not yet reached execution nirvana.
- HFT - Security Traders Assoc. of NY [ STANY] - Brainstrom Session
- Key points
- Lots of rhetoric about a “broken” market structure
- Internal industry infighting has spilled into the public arena
- The media loves a good fight!
- My take on it: Our markets are (mostly) better, but they are different than before.
- Different imperfections
- Fail in different ways
- Need to work on these rough edges!
- What is broken
- Need better containment against technical failures
- The decline in the number of public companies: Need to experiment!
- Let issuers pick their own tick sizes – they have the incentives to get it right.
- Regulation: Push SEC to hire experienced market people and move SEC to NY.
- Volume drought
- Need more companies, more splits, longer trading hours for most active stocks
- Haim Bodek's book : The Problem of HFT - Collected Writings on High Frequency Trading & Stock Market Structure
- HFT - Virtu Financial IPO prospectus
- The chart below illustrates our daily Adjusted Net Trading Income from January 1, 2009 through December 31, 2013," Virtu writes in the filing. "As a result of our real-time risk management strategy and technology, we had only one losing trading day during the period depicted, a total of 1,238 trading days
Sunday, April 13, 2014
Apr 2014:Media coverage of High Freq Trading Stories after 'Flash Boys'
- Trade Tactics: Slow vs. Speed [Feb 2014]
- Slow guy
- At IEX Trading Group Inc., all orders are slowed down by a fraction of a second after they enter the trading system, a tactic designed to prevent fleet-footed trading firms from racing ahead of orders from large institutions and driving up prices. Some proprietary-trading firms have been known to use their greater speed to change their bids and offers based on activity they notice on other trading venues and exchanges. By slowing things down, IEX hopes to put all traders on equal footing.
- Fast guy
- LeveL ATS, a dark pool. The company in October launched one of the industry's fastest matching engines connecting buyers and sellers. Its average speed for an order acknowledgment is below 60 microseconds, according to the company. The firm saw an average of 23.3 million shares traded a day in January, it said. Mr. Conary argues that the best way to avoid information leaking about an order, which could be taken advantage of by other traders, is being as fast as possible. LeveL is essentially fighting fire with fire: Its new matching engine was built by Thesys Technologies, the infrastructure arm of high-frequency trading firm Tradeworx Inc.
- HFT in Australian Equity Exchanges.[ Apr 2014 ]
- “ASIC’s study into high frequency trading in the Australian markets found no fundamental deterioration of market quality, or systematic abuse that threatens the integrity of our market. Rather, we found the Australian market, which is less fragmented than the US, to be one of high quality and integrity,” the spokesperson said in a written response to questions from Business Insider.
- But profiting is neither abuse nor manipulation. If it consistently happens to one side, over another, due to some sort of advantage, it is just unfair.
- Trading Profits of HFT shops. - An academic study [Apr 2014]
- "HFT traders do influence prices and outcomes for investors. A US research paper – The Trading Profits of High Frequency Traders [pdf], by Matthew Baron, Princeton University, Jonathan Brogaard, Foster School of Business, University of Washington and Andrei Kirilenko, Commodity Futures Trading Commission (CFTC) – found that HFTs make on average $0.25 per trade. “This equates to $18,799 per day for each HFT in the August 2010 E-mini S&P 500 contract alone,” the paper said."
- HFT Class Action Suit: City of Providence v. Bats Global Markets, Inc., et al. [Apr 2014]
- The City of Providence, RI, filed a putative class action complaint in the U.S. District Court for the Southern District of New York, naming as defendants 16 different national securities exchanges, 12 major securities brokers, and 11 high-frequency trading (“HFT”) firms. The Plaintiff, in the case titled City of Providence v. BATS Global Markets Inc., et al., claims to represent every class of investor who bought or sold stock on a U.S. exchange from April 2009 through the present. The defendant class is only slightly smaller.
- The allegations in the complaint are generally derivative of Michael Lewis’s recent book, Flash Boys: A Wall Street Revolt, and the complaint repeatedly cites that publication. The Complaint alleges that the named HFT firms engaged in a number of trading behaviors that distorted stock markets and disadvantaged other market participants. The complaint alleges that the broker defendants allowed the HFT defendants access to their clients’ trade orders, which gave the HFT firms an informational advantage when trading against the brokers’ clients in the market. The complaint also alleges that the stock exchanges and alternate trading venues allowed HFT defendants to “co-locate” computer equipment, which allowed an informational advantage that enabled them to disadvantage other market participants.
- The Complaint alleges three counts, all under the Securities Exchange Act of 1934: (i) violation of the anti-fraud provisions of Section 10(b) and SEC Rule 10b-5 promulgated thereunder; (ii) violation of Section 6(b) of the Act, as pertaining to registration of National Exchanges; and (iii) “insider trading” allegations for alleged violations of Section 20A of the Act.
- HFT Book - Broken Markets
- If you know little of financial markets you might find "Broken Markets" difficult to follow. But the Arnuk's and Saluzzi's thesis is not all that complex. The authors argue that our financial markets are thoroughly broken. They explain how stock exchanges have been taken over by high frequency traders who use sophisticated computer algorithms to scalp pennies off nearly every share traded. This has essentially transformed stock exchanges from facilitators of capital formation to arbitrage driven casinos that are rigged in favor of a class of speculators, the high frequency traders, who account for 50 to 70 percent of the volume traded on stock exchanges and, still more ominously, 80% of the profits.
- HFT Book - Dark Pools a book featuring Haim Bodek
- Manipulating the order flow can be done by placing very low bids or very high offers for stock, which jump to the head of the order queue. When counterparties disappear as the computers cancel orders at superhuman speed, which often happens in turbulent markets, stocks can sell for one cent or $10,000 per share. Disappearing orders can be placed to test the market flow, and orders invisible to other participants in the market are also possible.
- As yet, this high-frequency trading has not led to anything like 1987's one-day 22 percent fall in the Dow Jones industrial average. But the occasional "flash crash" is alarming, as is the effect on large orders. These have become more expensive to execute, thanks to front-running computer-piranhas which move the price before big orders can be fully executed. Thus effective liquidity, the ability to buy and sell large institutional positions at close to the market price, has been greatly impeded - needless to say producing large additional profits for the algo traders.
- In response, big orders are increasingly broken into smaller bits to avoid algo-detection. Patterson cites research, commissioned by the Financial Times, according to which average order size declined by 67 percent on the New York Stock Exchange and by 68 percent on Nasdaq between 2005 and 2010
- HFT - By Rishi K. Narang ; Another good writings on HFT ; From Quantitative perspective.
- Narang co-founded and was president of Tradeworx, Inc., a quantitative hedge fund manager, from 1999-2002
- HFT trading shop - Meet Getco HFT Trading King. [ Aug 2009]
- "Traders at Getco, a private company with fewer than 250 employees, use powerful computers and algorithms to engage in high-frequency trading. "
- "They are probably the biggest market maker in the U.S. stock market," said Justin Schack, a vice president at Rosenblatt Securities Inc. who closely tracks high-frequency trading. A market maker is a firm that always stands ready to buy or sell a stock.
Subscribe to:
Posts (Atom)
Shak.blog.notes 08/20/2024
Thinking Like an Architect - InfoQ tags: blog ...
-
# awk based script to calculate the latency of FIX protocoll messages. # usage: awk -f $someroot/ackdelta.awk [VERBOSE=1] [STAT=1] $some...
-
Author: Sakthivel Kathirvel Created: Apr 2006 Last Updated: Jan 2015 [grep] grep -rain grep -Pain grep -inverse grep -Pai...