HNHacker News
TopNewBestAskShowJobs

photon137

476 karma · joined November 18, 2011

Investor in Asia-Pacific companies. Derivatives quant in a previous incarnation.
submissionscomments
photon137··on Clipper, the Caltrain nemesis
This is a problem in London as well - most Tube stations have barriers but some of them don't and most DLR stations are barrier-less - so forgetting to tap costs you extra the next time round (ie for PAYG - passes are penalty-free).

A possible solution might be to have tap-in/out points within the train itself near the doors (possibly even small vending machines) - that avoids the insanity of rushing to tap-in / buy your ticket and getting charged extra if you forget to tap out - if you are at the door of a train and you can see a big, bold notice commanding you to tap out - it's hard to ignore that (you could, of course!).

EDIT: A counter-argument might be that it would create a blocking crowd near the "tap-point" when many people want to alight at a major station. Well, this can be avoided by having (a) a tap-point at all doors and in locations within the carriage and (b) accounting for tap-ins/outs correctly by determining your Clipper/Oyster state and the position of the train (ie if you tap-out in between stations, it means you'll alight at the next one).

That's kind of what they do for buses in Singapore.

photon137··on PostgreSQL 9.2: Full-throttle Database
> index only scans will do wonders for append-mostly workloads

Won't updates be actually slower once indexes are added to take advantage of index-only scans?

Another issue that I can see comes not from having the index-only scan feature (which is cool, though belated) but having a query planner intelligent enough to figure out which index to hit - ie query optimization.

If the columns used in WHERE clause do not contain the appropriate columns (particularly for non-clustered indexes), shouldn't index hints be supported to help pick up the relevant index or would we end up with horrible execution plans leading to tablescans?([1] - I see this as a case of devs overriding users)

[1]: http://it.toolbox.com/blogs/database-soup/why-postgresql-doe...

photon137··on Facebook explains what's wrong with the mobile web
It's not as if the hardware isn't capable of doing awesome stuff (case in point: the idTech 5 demo from John Carmack [1]) - the software using it also has to be well engineered.

Good engineering for managing hardware resources at the browser level is still lacking (at this moment, Chrome's various processes are eating up ~700MB of memory on my system - disgraceful!) - and that's what bites Facebook the most.

[1]: http://www.youtube.com/watch?v=uofg7m2rtQ4

photon137··on Bollywood vs. Bin Laden
This might be relevant as a counter-point:

http://world.time.com/2011/08/15/how-a-late-bollywood-icon-s...

photon137··on Fed Undertakes QE3 With $40 Billion in MBS Purchases Each Month
I tried to explain this in a post a while ago:

http://news.ycombinator.com/item?id=4087686

photon137··on Ask HN: If JavaScript could talk to databases
Direct client access to a database as being the most prominent concern raised here (which to me was the main concern as well) - I will need to think about it.

Say we magically got rid of the security problem (thus eliminating a middle tier - and I admit it'd be some pretty mean magic), then could your second point could be addressed by this: http://news.ycombinator.com/item?id=4518443 ?

Regarding your third point, I agree it's not the most elegant of languages - but if some language which is elegant could run on browsers and had database access capabilities, would one use that instead of having a middle tier to generate "pages"? (as things stand, much of the middleware these days generates and receives JSON/XML and data anyway - can we do away with generating that initial HTML totally?)

photon137··on Ask HN: If JavaScript could talk to databases
But that could be done without a web-specific framework right? Say I had JavaScript on the client side send me a computation request to do something massive, say on a grid - I will probably run that using C/C++/Java there and return the result to JavaScript.

My point is, do we really need something to generate HTML at all at what we usually call the "server"-side?

photon137··on Fed Undertakes QE3 With $40 Billion in MBS Purchases Each Month
They buy mortgage-backed securities in the secondary markets which, in simple terms, are bonds issued by securitization agencies (well, mostly by Fannie Mae and Freddie Mac in the residential mortgage area) to fund pools that buy and collect individual residential mortgages. The higher prices for MBSes leads to cheaper funding for such pools.

If funding of mortgages is cheaper for banks and agencies, then they become cheaper for the borrowers as well. Even if you aren't buying a new home, you can refinance your existing mortgage at a lower rate.

photon137··on Fed Undertakes QE3 With $40 Billion in MBS Purchases Each Month
I'll add to this.

Edit: consumer-level or corporate level credit won't be any cheaper - only a very specific type of credit, ie mortgages, would become cheaper still.

As you've rightly pointed out, the Fed is targeting mortgage rates, and thus, home affordability. This is to support house prices and encourage construction-based spending in the economy.

House-buying and construction have the biggest multipliers in terms of their knock-on effect on the economy. That's why the recession was so deep - and that's why a recovery can only truly be kick-started by making mortgages affordable.

However, some big downside risks here:

(a) The European crisis, obviously - although the politicians now seem to have come to their senses a little bit.

(b) The credit burden on the US consumer - consumers are still quite leveraged and spending is still financed heavily by credit than by pure income. That will always cause blips to the economy (like oil-price induced inflation) to be magnified and will defeat what the Fed is trying to achieve.

(c) Short-term commodity inflation risks - but given that WTI light crude is almost $20 below Brent crude, there already is a North American supply glut.

photon137··on Why Don’t Americans Elect Scientists?
Not really. Engineers venture out into the grey even more than scientists do - they solve problems of interest to humans - their job requires them to be grounded in reality and be sensitive to human needs and constraints (well, at least the good ones are).

I often think that while a purely technical background and education might be really powerful and enable one to analyze and predict well-behaved things better than others - which could lead to better decisions, it is extremely important to be receptive to the "inexplicable-until-experienced" stuff like music or business or relationships - to know that there are things that can't be controlled and shouldn't be controlled - that some things should evolve of their own accord - the chaotically evolved imperfect being more beautiful than the mathematically-designed perfect. (Edit: a combination of both works quite well, in my experience - some of the best businessmen, economic and political advisers I know of have engineering backgrounds - and no, they aren't unreasonably conservative or dogmatic).

In my opinion, the fear of "what will happen if I let go?" can lead to authoritarianism via technocracy (aside from the fact that anyone can get drunk on power) - not one's profession.

photon137··on [dead]
Ah no, go ahead...I was just answering a question here - satisfied with that :)
photon137··on [dead]
There is: http://www.businessweek.com/news/2012-08-12/imf-says-bailout...
photon137··on Stop Using The Cup of Coffee vs. $0.99 Cent App Analogy
Why not price the coffee at $30 then for millionaires? Surely the marginal utility of $30 to them would be similar to that of $5 to someone earning $60k? Why would one pay $5 for the same amount of gas one month and $3 in another month when the marginal utility derived from the purchase of gas is precisely the same?

Ignoring the price effects induced by the supply/demand characteristics and intrinsic nature of the good in question (inelasticity of gas demand, in this case) leads to bad pricing as much as incorrectly estimating the marginal utility of a product to consumers.

photon137··on Stop Using The Cup of Coffee vs. $0.99 Cent App Analogy
This has got more to do with production and consumption of a physical good as compared to a "virtual" good than anything else. The marginal utility you mention for coffee is derived from the physicality of the product - and thus I think the Starbucks vs. app comparison is invalid.

The barrier to entry to create and deliver a software application is extremely low as compared to creating and delivering almost any physical good. The physicality of a thing - especially coffee - ensures that only one instance of it can be used at any time (and it would probably be "used up" during consumption). Creating a new copy has costs (where copying and delivery costs are zero and more than one copy can exist at a time disorienting the supply/demand dynamics, people would always be reluctant to pay for a thing - hence digital piracy).

Software, has no such restrictions and virtually zero delivery costs. That's why RMS always said that charging for the act of software development is right. But charging for copies of the same stuff (and not providing its source) is not - people may talk about intellectual property - but that's a different debate.

When you buy a car, you pay for it - your neighbour with exactly the same model also pays for it. It's also "open-source" (or at least, it used to be) - you can take it apart and figure out how it works. What you might not be able to do is to create the car from scratch (you may not have the tools, materials, expertise etc.). And that's why you pay a hefty sum for it.

The same does not hold true for simple apps - they are easy to put together, the tools to do so are freely available in most cases and the expertise can be gained in a short amount of time. Hence, the $0.99 price tag - because the developer knows it's easy enough to put something together for free - if you had the time.

Note that this does not apply to high-end software where significant amounts of R&D and engineering effort is required - and hence the end-product can't be easily reproduced from scratch. That's why I still feel slightly guilty (and very privileged) when I can download and use Linux for free and browse through its source all I want - economics says it shouldn't be free - but it is.

photon137··on Visual Studio 2012 and .NET Framework 4.5 released
That's a valid comparison - 2008 vs 2010 (versus the stupid VS6 comparison) - and one I agree with in many respects - especially UI responsiveness.

However, paging-in after idle-time is pretty similar, in my experience for both 2008 and 2010 (2008 fares worse for large solutions - especially if they have web projects in there). Build times are actually faster for VS 2010 (especially if you're on x64 - where it can use multiple cores). Symbol-loading when attaching to a process to debug is way faster for VS 2010 than in 2008. Detaching from a process also seems to have less negative consequences - VS 2008 just crashed in many cases.

However, VS 2010 is way too chatty in debug trace outputs. Also, slightly slower in parsing includes for IntelliSense after project load (not so during build though, funnily enough).

photon137··on Visual Studio 2012 and .NET Framework 4.5 released
I am being serious. I'd rather doubt the seriousness of anyone moaning about an 11-second delay before they can start to code using Visual Studio while ignoring the features one truly uses Visual Studio for (which you have conveniently labelled as "not interested in using").

Why are they using Visual Studio at all then? Why not Textpad/Notepad++ or Emacs if they're so concerned about startup time? The only IDE that does come close to VS in functionality is Eclipse and that has a woefully slow startup time - never stopped any Java developer from touting that as the greatest IDE ever (it exceeds VS in many cases, IMO). Both of these IDEs, once they load, are extremely responsive considering the scale of the projects they are made to handle. JIT compilation occurs for chunks of code as you type code - that is dazzlingly fast for VS (and it's not just plain symbol-based lookup as used to happen in VS6 IntelliSense).

  Incidentally, I don't think it was really features that made VS2010 slow
What do you think makes it slow during startup? According to me, it's sub-component/assembly/library load time during IDE startup and file parsing/symbol loading time during/after project-load.
photon137··on Visual Studio 2012 and .NET Framework 4.5 released
That's too flimsy a reason for labelling a product as "going downhill", in my opinion - but to each his/her own. You do realize that VS2010 has way more functionality than VS6 - debugging parallel apps/attaching to native, non-native processes and being able to step through both varieties of calls/code completion and snippets etc?
photon137··on Visual Studio 2012 and .NET Framework 4.5 released

  ...has been going downhill.
  ...I'm referring primarily to the C++ IDE
How, specifically?
photon137··on Options Pricing in Excel with QuantLib
How advanced and how expensive?

Numerix (http://www.numerix.com/products-and-services) is one. I've used them before at my previous job to handle client portfolios.

In general you'd need to have separate licenses with the feed providers (Reuters/Markit/Bloomberg etc) and those are quite expensive.

photon137··on Options Pricing in Excel with QuantLib
You're welcome (I'm pretty sure I've set some sort of a bad precedent here :) )
photon137··on Options Pricing in Excel with QuantLib
Well, it requires an unmanaged dll (NQuantLibc) to be compiled which would be pinvoked by the managed bindings dll (NQuantLib). The unmanaged dll will not be platform independent (I don't know if you'd be using x86/x64). It also needs to be copied over to the same directory in which your output binaries would reside.

Anyways, I've uploaded an x86 version:

PM> Install-Package NQuantLib (https://www.nuget.org/packages/NQuantLib)

photon137··on Options Pricing in Excel with QuantLib
I agree. It's quite messy. That's why I use the C# swig bindings instead and if I had to use Excel as a UI, I'd build my own plugins in C# rather than use the ones they provide - in a similar fashion as you've done with Python.
photon137··on Options Pricing in Excel with QuantLib
This reminds me that compiling QuantLib is such a pain in the ass. I love QuantLib though - I use it via C# and there is an Excel plugin already available in the source code.

As regards your example:

(a) single-name options usually have an American exercise-type.

(b) the main difficulty (and the thing one would actually pay for) is getting and maintaining a vol-surface for pricing these things - using flat vol to price this is quite inaccurate and risky.

photon137··on A Physics Lesson: Why Cats Land on Their Feet
Oh, I can chip in here regarding big vs small flywheels. If you look at the purpose of a flywheel - ie storing kinetic energy - a bigger/smaller wheel can serve the same purpose. The reason we don't have "large" flywheels is twofold:

1. size (obvious) 2. Torsional/shear stress - most materials are bad at tolerating shear stress. A bigger flywheel would require immense amounts of torque to get it moving. Generating a higher torque would impose huge amounts of torsional stress on the shaft driving the wheel.

photon137··on A Physics Lesson: Why Cats Land on Their Feet
I worked on designing such a thing while at university using differential angular momentum - kind of like a cube with a high-speed rotating wheel embedded in each face. The wheels on opposite faces cancelled out each other's angular momentum - but if you vary the speed of one of the wheels slightly, it would give a small amount of angular momentum about any desired axis.
photon137··on Mean Variance Optimization
Actually, financial markets have employed non-Gaussian Levy processes in modelling derivatives for a long time (it is a bit different from the Levy distribution, I agree - but nothing stops the processes from having non-finite moments).

For example, a very widely used process for modelling information-driven timeseries (like stock returns) is the jump-diffusion model where the diffusion component is a Brownian motion while the jump component is a Poisson process.

The underlying volatility is often modelled using a different process - e.g. the SABR model, the Heston model etc.

There are similar cases for interest-rate processes (Hull-White/BDT etc) which have to satisfy conditions of mean-reversion and no-arbitrage across the yield curve.

See, it's not as if we don't realize that the underlying processes are mathematically inadequate to fully explain all market movements. But for a model to be useful, it has to satisfy two conditions:

1. Be able to produce a non-arbitrageable "mid"-price for making a market (ie if someone asks a trader to quote the bid-ask for an option, e.g.)

2. Be able to reproduce the current market prices of an asset/its derivatives. This requires model calibration.

Models are chosen based on how easily and how fast they can satisfy 1 &2.

Do they produce risk numbers that are believable? Probably yes, if the model has been calibrated and has been tested against out-of-sample inputs.

Do they guard adequately against event-risk (the thing you would try to signify using your "infinite" variance distributions)? Probably not - but then again, nothing does. How would you go ahead and calibrate the Levy distribution so that the sampling process can explain currently tradeable market prices? Would be it a "do once, leave forever" calibration? Or would it change from day-to-day (ie "local" calibration)?

photon137··on Mean Variance Optimization
>we have seen bizarrely correlated asset price changes due to macro issues

Actually, this is quite expected given event-risk in the market. For example, even in a non-crisis situation, correlation increases in intra-day trading when market-moving news is due - e.g. payroll numbers are due or ISM numbers are released.

Coming back to the present, headline-risk hasn't been as high as it has been since May, 2010 as we keep having one EU summit after another, one central bank announcement after another and each having a huge impact on how asset prices behave.

So the correlation is not entirely bizarre - people have been making correlation trades as well - for example JP Morgan's huge loss while betting on credit index tranches was a bet on implied vs. realized correlation (it didn't play out as expected, of course).

I'd be interested to know how people are playing this out in the equity space - via variance swaps?

photon137··on Mean Variance Optimization
Firstly, nice effort.

Secondly, some features you could add:

1. Constrained optimization - including budget constraints, sector selection constraints etc. A tough one would be cardinal constraints e.g. I am limited to 4 stocks etc.

2. Return attribution - whether the returns your portfolio earned were due to stock selection or asset allocation or both (Brinson Model: http://www.mscibarra.com/research/articles/2002/PerfBrinson....).

3. Performance and compression - how would this deal with huge covariance matrices? 10000 x 10000? Matrix operarions on these wouldn't be trivial. In-memory serialization/deserialization issues also come to mind. (edit: then again, Excel can't do 10k x 10k :) )

4. I'm not conversant with SciPy - does this use BFGS/similar for optimization?

5. Compute as a service? Host a grid? Let calculation requests come to you via Excel? (Nobody would want a 10000 asset timeseries to be processed on their CPU for two hours).

photon137··on Watch High-Speed Trading Bots Go Berserk
"If you buy on the timescale of days to weeks, you can completely ignore HFT"

Not if you have to deal with intra-day margin calls or stop losses.

The trouble with most HFT-based algos is that most of them rely on a set of common signals (regardless of how "diverse" their creators may claim them to be) and end up making the various markets and assets highly correlated.

So when stops trigger, they cause a massive cascade. This needs to be protected against at the exchange-level (edit: they do so via various mechanisms). Most bots usually don't have the sophistication to protect against tail-events.

photon137··on Eugene Kaspersky: What Wired Is Not Telling You
I agree politics is a very important part of our society and people should be interested in it.

But technology is a means to solve problems whether they're presented by the struggle of humans to make their life better against the elements - in which case the solution would ought to be non-political - or whether they are presented by humans living, interacting and governing themselves in a society - in which case a solution may be driven by politics but is a solution nonetheless.

A blueprint of a missile doesn't say that it's driven by a particular ideology - it's just a solution for a political/social problem. Anyone can discuss it without involving politics. However, humans by their very nature add context to things (in this case, it'd be political) and that's perfectly alright. My argument is - ok, it is possible to discuss these things productively without involving politics or political opinions at all.

← PreviousPage 2 of 5Next →