Optimal Fuel Hedging for Airlines

Some airlines are currently losing money because their fuel hedges have locked in higher prices as ticket prices fall.  I’m not sure they understand the difference between hedging and speculation.


Does anyone know how much the fuel hedging teams at airlines talk to the pricing teams?

The problem is that airlines seem to think only about hedging expenses, not revenues.  They know they have all these future scheduled flights that will consume a certain amount of fuel.  So airlines talk about pre-purchasing all that fuel.  Or they buy a particular percentage of it and call it partial hedging.  Then when fuel prices fall, new carriers can enter the market at lower prices, reducing the revenue of airlines who have already locked in their expenses. Continue reading

Round Earth Theory of Evolution

I read this article http://theweek.com/articles/444891/should-stop-believing-evolution and noticed the arguments it makes are pretty weak.  It compares belief in evolution to belief in the color blue.  I’d say evolution is more like special relativity.  It’s non-intuitive and not obvious, but with enough effort it can probably be understood, analyzed, measured, observed. Continue reading

Buy Computers This Year

This year’s CES offers some exciting developments in computing.  But first, isn’t it odd that all these products are released just after Christmas?  Maybe it’s because Christmas is more about stores clearing shelves of unsold inventory at the end of the year.  Obligatory gifting customs lead people to buy discounted junk for others.  Stuff that they wouldn’t otherwise want for themselves.

I’ve held off new computer purchases for a long time, waiting for the 14nm chips from Intel.  They’re over a year late, which is understandable considering how amazing they are.  One can only imagine the internal dynamics at Intel, where the management and marketing team want to adhere to a long-term schedule of improvements while the scientists and engineers can only guess how long it will take to develop cutting-edge technology.

Here are the reasons I think 2015 is a good year to upgrade computers:

  • 14nm chips offer reduced power consumption, which means longer battery life, less heat, quieter fans or no fans.  It seems like it’s just another size in a long progression, …45, 32, 22, 14. But this time the performance change will feel like a breath of fresh air, the same way that 64-bit chips alleviated maximum RAM issues or SSD’s solved storage seek times.  And note that a 15W quad-core chip compared to a 45W dual-core chip is going to use even less than 1/3 the power to run a single thread because the power rating is for all the cores.
  • Screens are finally being marketed in terms of resolution.  I even saw a laptop screen quoted in megapixels.  I’ve always said monitors should be evaluated on megapixels and camera sensors on size.  Maybe we just had to max out practical screen sizes and camera sensor resolutions before shifting attention to the other factor.
  • vPro will make remote management of computers much easier.  With it, I can reinstall an OS at the office from across the ocean.
  • The AES-NI (Advanced Encryption Standard New Instructions) should reduce processor workload.  Even if you don’t encrypt all your data, you probably use https, VPN’s, WPA, or something else that uses AES encryption.
  • The Intel Compute Stick is fun.  Imagine the possibilities offered by a computer so small, low powered and inexpensive.  You could have a solar powered computer on your roof.  A computer in your car.  A computer attached to each TV (for people who still use TV’s!).  Sure, all that was possible before with the Raspberry Pi or by turning a smartphone into a PC, but that required effort.

Last year, a new laptop made little sense when compared to a 4 year old laptop.  With similar weight and processor performance, you would get a worse screen, better battery life, and better video performance.  It made more sense to buy a used laptop, throw in an SSD and clean the dust off its heat sinks.  I’m using a 6 year old Precision M6400 and my only complaints are weight and fan noise under heavy load.

I’m recommending the new Intel NUCs with Broadwell chips and the Dell XPS 13.  Personally, I’m going to hold off on a laptop upgrade until the 14nm chips make it into a Precision mobile workstation since I want two hard drives, more built-in ports, and a 15″ or 17″ screen (yeah, screen size also matters a bit).

Insight Oil Report 2

This time, I ran the oil 10 months and 7 days for 20,824 miles.  As we can see, the wear levels are still good and the oil properties held up.  I’m going to go for 25,000 miles next time.  Also, I cleaned dirt that had accumulated near the oil fill hole on the engine.  Not sure if some of it got inside and somehow dissolved in the oil.

R22 carb heat

It’s also time to change the air filter.  I’ll change the filter and check the intake hoses.  The whole intake system may get reworked if I get around to installing a carb-heat style hot air intake system to increase efficiency.  Hot air ought to reduce pumping losses and may improve combustion a bit too.  I got the idea while thinking through all the reasons fuel economy drops in the winter.  Carb heat systems on aircraft are simple, like dryer vents that suck air from a metal scoop near the exhaust manifold, so it should be easy enough to add the same feature to my car.  A more complex design could include a bypass that opens up whenever the throttle moves beyond a certain point.  It would have to use its own spring and pull-only actuation so there’s less chance of a jam holding the throttle open.





Car Headlights

I shopped for a replacement headlight for the Insight.  Based on the claims of brightness made on the packaging (see below), the XtraVision seemed best because it’s brighter without sacrificing the warm color temperature of the basic halogen bulb.  Yellower light is less annoying to oncoming drivers and improves sharpness and color rendering.  There’s a reason shooters and racers wear amber lenses.  “Selective yellow” is what it’s called.  See http://en.wikipedia.org/wiki/Selective_yellow

I inspected the bulb filaments to see the difference, which led me to check the rated life of each.  The standard bulb lasts 7 times as long as the XtraVision.

Allowing $40 of labor for purchasing, storing, and replacing 2 bulbs, the XtraVision costs $70 for 160 hours = 44 cents per hour = 0.7 cents per mile driven in the dark.  The standard bulb effectively costs around 1/7th as much.  0.7 cents per mile just for the headlights is unacceptable given I try to keep the car’s maintenance costs below 10 cents a mile.  The tires, oil, and brakes should be the main expenses aside from eventual engine overhaul.  So, we’re going with standard bulbs until someone makes LED replacements that use warm white 2700K or 85+ CRI chips.

The spec sheet shows that all the bulbs have the same light output, which is probably why they have to put “Up To” next to each of the brightness claims.  The more expensive bulbs are just a way to scam customers who want to pay more for a bulb that needs to be replaced far more often.

Sylvania 9003Sylvania 9003 marketing


follow-up on Flash Boys

In my previous post, I discussed market microstructure.  I hypothesized that limit orders directed to exchanges paying for order flow rather than paying market makers would be executed first.  I couldn’t think of a good reason to route limit orders to IEX.  So, I just ran a preliminary test of the hypothesis by sending 5 orders of 100 shares each to various exchanges, including the InteractiveBrokers Smart Router.  Note that the exchange rebate structure has changed since the publication of Flash Boys.  BYX is now the exchange that pays the most for order flow.  Here are the results.

trades and volume

trades and volume

You can see that I traded on BYX first, as expected.  I paid the seller about 20 cents for the order flow.  A minute later, a larger sale came in and I received about 20 cents on each of BATS, ARCA, DirectEdge, and Island.  The Smart Router had chosen Island.  Then, someone sold 100 shares at 19.16 without knowing he could have made $3 more on IEX.  And a minute and a half later, my IEX order got filled.  To state the obvious, it sucks to have a $19.19 bid go unfilled as someone else sells for $19.16.

Here’s a full view of the bids and asks during this time.  You can see how the BYX trade happened while the asset was still being quoted at its original level.  Even though I paid 40 cents more for those 100 shares, it was a better deal than the second set of trades.  They occurred just as a big sale came in and drove the value down around 5 cents ($5 per 100 shares).  And then the IEX trade didn’t occur until the ask came down to $19.19.

bid, ask, and last trade

bid, ask, and last trade

Another way to see that the IEX execution was bad is to think of it this way:  You want to always be buying on the white line and selling on the blue line.  The BYX trade was good because the white line and blue line didn’t move when we bought on the white line.  The second set of trades were okay because even though the white line dropped as soon as those trades occurred, the blue line still remained above the trade price.  The IEX trade was bad because we bought on the blue line.  Someone had announced intention to sell at $19.19 to the entire market and that’s when IEX sent our order over to match with that seller.

I have another experiment planned, so stay tuned.

Flash Boys

I read Michael Lewis’s Flash Boys in a single sitting at the Cambridge Public Library.  For context, I rarely finish books and it usually takes months.  I read it because I needed to understand the pros and cons of routing trades to IEX and couldn’t find enough detail online.  Flash Boys turned out to surpass my expectations, but left me wondering why IEX doesn’t publish a more concise explanation of how the market works and why trades should be routed to them.  Claiming they have a coil of fiber to introduce a delay that slows down HFT is hardly an explanation.

I should mention that I was positively surprised to see Lewis mention both Nanex and Themis Trading, because they really are the best resources for understanding market microstructure and how HFT works.  I’ve been following these problems with the markets for 4 years now, and never imagined it would get so much public attention.

Lewis identifies a few ways in which HFT takes money from investors.

  1. High speed links between exchanges beat customer orders from one exchange to another.
  2. Varying rebate structures cause brokers to route customer orders to where the broker gets paid the most and the customer is therefore least likely to be filled.
  3. Orders in dark pools can be executed at stale prices because they aren’t displayed as part of NBBO.
  4. Sub-pennying.  Lewis actually fails to explain how sub-pennying hurts traders.  There’s a single reference to sub-pennying in the book, but it says nothing about how it works.  See http://www.nanex.net/aqck2/3519.html and http://www.defendtrading.com/cfm.v21.n1.2.pdf

I wish the book had a technical summary of all the phenomena seen, so I’ll try to write one here.

First, some background for non-traders.

There are two basic types of trades: market orders and limit orders.  Market orders are for traders who have strong convictions about the direction a stock is moving.  They are designed to get executed immediately at the best available prices in the market.  They’re also called “market taking” because they take whatever prices are given.  Limit orders are for traders who want to guarantee a particular price or are willing to wait for someone else to trade in the opposite direction.  They’re known as “market making” because they make up the prices you see posted in the market.  A market order is like selling your car to a dealer.  You get instant money, but not as much.   A limit order is like listing the car for sale and waiting for a willing buyer.

Secondly, the order in which trades are executed matters a lot.  Imagine you and a dozen other people are trying to sell something of uncertain and changing value.  If you’re all offering the same price, you don’t want to be the last person to sell.  If that happens, it’s because a buyer came and bought everything, which implies that the thing you sold is probably now worth more.  On the other hand, if you’re the first to sell and everyone else is still offering to sell at the same price, that’s great.  You still have the option of undoing the sale by turning around and buying from another seller at the same price.  Furthermore, imagine a buyer comes and offers one of the sellers a dollar less to buy the thing and the seller agrees.  If you can jump in after the agreement, push the seller aside by offering to save the buyer an additional penny, the buyer probably wouldn’t mind, you’d still be able to undo your trade at a 1 cent loss, and the seller you displaced would feel unfairly treated.

Now, on to the 4 HFT phenomena.

  1. Phenomenon 1 (fastest links between exchanges) only affects market taking orders, not market making orders.  Katsuyama complains that when he sees shares offered on multiple exchanges and sends an order to buy all of them, only some of them get filled.  For years, traders have known that the way to get around this is to release the orders such that they all arrive at nearly the same time.  But maybe Katsuyama discovered it first and it just took a long time for Lewis to write the book.  By the way, you also have to flag orders as ISO (intermarket sweep order) so that the receiving exchange doesn’t wait to confirm that there isn’t a better price at another exchange.  By that time, the available price would have disappeared.  IEX helps a lot here by providing such sweep order functionality to traders who don’t have direct connections to all the exchanges.  I’m surprised nobody mentioned the idea of using synchronized clocks on machines located outside each exchange that release a large order within light meters (tens of nanoseconds) of each other.  I’m sure there are firms doing it.  Maybe Katsuyama didn’t tell Lewis.  But it should be an obvious solution to anyone who thinks about the problem a lot.  Another thought on this phenomenon is that it’s nothing new.  It’s called cross market arbitrage and they used to use telephones.  It’s an unavoidable fact that whoever has the best communication method will keep markets in line with each other.  The unanswered question is, “Why aren’t all customers bringing their trades to the same venue?”  If new exchanges start and pay brokers extra to bring orders there, why don’t all brokers end up directing orders to the single exchange providing the highest kickback “rebate”?
  2. A lot of exchanges provide rebates for market making orders and charge market taking orders.  This incents brokers to direct limit orders to exchanges with the highest positive rebates.  Obviously, those orders will be the last to be filled, since it costs more to take them.  I’m not sure how IEX helps here.  If I post a limit order on IEX that matches the NBBO, it’s not going to get filled before the one on BATS.  Small market orders prefer BATS because they offer a negative rebate (get paid to take markets).  Big market orders often hit BATS first too, as described in the book.  To help limit orders get filled quickly, IEX needs to change the fee structure and pay for market orders while charging limit orders the way BATS does.  And as things are right now, I have no incentive to route small market orders to IEX.  I’m best off sending them to the exchange with the highest negative rebate.  The only counterargument is that the prices on certain exchanges could be stale and no longer available, but here we’re talking about prices that stay stable for multiple seconds at a time and your customer order is the first event causing the price to move.
  3. The dark pool incident in which Rich Gates sells stock on an exchange at a price below the price he’s bidding in the dark pool is interesting.  It wouldn’t happen on a lit exchange because the sell order would automatically be re-routed to your standing best bid.  Maybe the lesson is to not leave limit orders unattended in dark pools?  It’s like being willing to sell a car, but not posting it to craigslist or AutoTrader.  You only tell your local dealer that you’re willing to sell the car and wait until he has a customer willing to pay more, at which point he buys it off you.  Why would you do that?  IEX is a dark pool, but it prevents such occurrences using the coil of fiber that delays dealer trades.  What happens is that while the dealer’s attempt to take your stale limit order is looping around in the fiber, IEX learns about the new prices being offered in the market and then blocks your limit order from executing with the dealer because the order could get a better price now on an “away” exchange.  That’s pretty cool.  But it’s not well explained in the book.  I bet most readers don’t think through exactly how introducing a delay helps at all in protecting against HFT because the fast traders will always be faster than the slow traders.  Lewis should have been very clear that the delay effectively solves the problem of the SIP being too slow and ensures that the exchange knows the NBBO before the trades are executed instead of learning of it too late.  In summary, IEX seems to be a properly functioning dark pool, but I can’t think of any compelling reason to post limit orders in a dark pool instead of publicly at an exchange.  Dark pools seem to be for traders unable to mask their order size by breaking up the order.
  4. Sub-pennying occurs when a market order is about to take a limit order, but then an HFT jumps in front of the limit order by 1/100th of a cent as “price improvement” for the market order.  The market taker saves a penny while the original market maker remains unfilled and protects the HFT from the price immediately worsening.  The end effect is similar to what happens in dark pools (an HFT disrupts two traders from trading with each other).  But sub-pennying happens on public exchanges.  I don’t know a way around it.  It really sucks when you’re at the front of a queue of limit orders and an HFT takes your fill for a meaningless amount of money.  It’s not clear how IEX helps here.  I assume trades executed on IEX only occur at whole cents, so there is no sub-pennying.  But market takers don’t really care so much about sub-pennying because they’re still getting nearly the same price.  And not having your limit orders sub-pennied only helps if people are routing market orders to the exchange where your order is posted.  Therefore, I think IEX should offer negative rebates and pay market takers to bring business to the exchange.

The midpoint peg order offered at IEX seems like an appealing concept.  Bad trade executions are ones where the counterparty immediately knows he got a good deal.  When you take part of a posted market and don’t push the price to the next level, the market makers are happy, which is bad for you.  When you are the last limit order to get filled at a certain price, you have an immediate loss.  The right way to trade is to take the market when you have high conviction about which way the market is going or have limit orders near the top of the book.  If neither of those are possible, having your trades execute halfway between the bid and offer is nice because you know your counterparty is trading out of a need to trade and not to immediately make a profit.  The trouble is that midpoint peg orders can be discovered by probing the market and then traders can manipulate the bids or offers to change the midpoint before executing against your trade.  For instance, say I’m bidding for 10,000 shares and the stock is 24.82 at 24.84.  Someone can send a midpoint buy and a midpoint sell to see which way there’s trading interest to determine that I’m a buyer.  Then, buy all the offers at 24.84, pushing the market to 24.84 at 24.85.  Immediately send a midpoint sell to get rid of the shares just purchased for a half cent profit on each.

There’s actually nothing wrong with the old-fashioned market model of price-time priority and a single exchange.  Your limit orders are treated fairly.  IEX could be that market, except that it’s a dark pool right now.  It also has to deal with a lot of the good customer market order flow being internalized or going off to exchanges that pay negative rebates.

Finally, here are some excelllent posts by Dennis Dick that clearly explain the most egregious flaw in how the stock market currently works.  Until there’s a legislative fix, do the right thing and switch to a broker who allows you to directly route your orders to public exchanges.  We’ll all save money and free up the country’s top technical talent for solving real problems.

(1) http://premarketinfo.com/2012/02/23/dark-secrets-where-does-your-retail-order-go/

(2) http://premarketinfo.com/2012/07/23/exploring-the-hidden-costs-of-retail-price-improvement/

Scamming with the Phrase "Peer-to-Peer"

These days, we see the term “peer-to-peer” describing all sorts of new businesses.  There’s P2P lending, where people bypass banks and lend money to each other.  P2P carsharing, P2P livery service, P2P lodging. Real estate agents should advertise as facilitating P2P house trading.  When people buy or sell houses, they’re almost always transacting with other customers, not businesses or professionals, so it seems totally P2P to me.

I ask, “What qualifies as peer-to-peer?” because I see CurrencyFair and TransferWise using the term to imply that you can exchange money directly with another customer instead of going through a bank.  The thing is, that’s not at all how it works at CurrencyFair despite their early marketing materials depicting customers transacting with other customers.  CurrencyFair have come clean and admitted how it really works in the fine print on their site, but they continue to use the term “peer-to-peer”.  I’m pretty sure TransferWise also doesn’t match customer orders only with customer orders and I’m about to begin investigating to check if they’re profiting off of imbalances in customer order flow, but my speculation as to what they might be doing is for another post.

Consider a used car dealership.  Used car dealers could argue that they’re a peer-to-peer business.  As if they’re just providing a service of matching buyers with sellers.  But I’d say that they’re not P2P because the buyer doesn’t know what price the seller received.  Neither the buyer nor seller can tell the true cost of the transaction.  The dealer’s profit comes from holding inventory and offering different prices to buyers and sellers.  With real estate, on the other hand, buyers are truly matched with sellers while the brokers take a 6% commission with all the compensation out in the open for all to see.

CurrencyFair operates a platform on which parties (not just customers, as we will see) can exchange currencies and pay 0.15% in commission.  However, because it’s unlikely that customer orders come in equal and opposite quantities at the same time, CurrencyFair operates its own currency dealing business that will always offer to trade at 0.5% worse than the going rate for currency.  So most customers actually trade with “the house” and pay on the order of 0.5%.  I asked CurrencyFair if I can become a participant dealer and improve pricing by offering money at 0.4% worse than the going rate at all times, but they wouldn’t let me.  They don’t even offer the ability to place an order pegged to the mid-market rate to trade with any customer that comes along.  Because exchange rates move so fast, it’s unlikely that two customers will trade with each other unless they’re allowed to enter orders that track mid-market.  If I place an order at mid-market, the market will move and CurrencyFair’s dealer will trade with my now stale bad price before a customer gets to benefit from it.  That’s about as peer-to-peer as a car dealership where a seller just might happen to run into a buyer in the parking lot and negotiate a direct deal.

Is there legal precedent for such a business?  Stock exchanges used to be owned by their members.  The New York Stock Exchange was a venue for brokers and dealers to trade with each other and would charge a commission for each trade.  But because customer orders to buy and sell stock (brought to the exchange by brokers) don’t come in equal and opposite quantities at the same time, the dealers (who owned the exchange) would trade with the orders at slightly unfavorable prices.  That’s a lot like how CurrencyFair takes a 0.15% commission for each transaction and at the same time the people who own CurrencyFair always get to trade at prices in their favor.  The difference is that the way the NYSE worked was fairly widely known.  Customers didn’t like overpaying for transactions, but knew that feeding the dealers was just part of doing business.  It didn’t feel as much like a deceptive scam.

I can summarize it like this:

  •  Car dealers don’t tell you black book prices.  Yeah, you’ve never even heard of it, right?!
  • CurrencyFair doesn’t tell you the fair price for your transaction, which would let you see how much you’re losing.
  • TransferWise shows you a fair price, but probably not the fair price at the time they decide that your transfer will definitely be executed.