News for hackers. Stuff that matters.

throwaway183839

Re:A Curious Property of 82000 on Tuesday May 19, 2015 @03:15PM (#9572425)
The argument isn't saying that arithmetic is random. It's saying that a lot of properties of number systems behave as if they are random.

A good example is finding arithmetic sequences of length K in the prime numbers (for example, the sequence 3, 5, 7 is an arithmetic sequence of length 3, as is 17, 23, 29). It can be shown that random sets that have a density similar to the primes (i.e. the chance that N is in the set is proportional to 1 / log(N)) have arbitrarily long arithmetic sequences - as, in fact, do the prime numbers.

Re:Start doing more things alone on Sunday May 17, 2015 @06:52PM (#9562052)
Kind of off topic, but your comment reminded me of something that I've wondered about for a couple of months.

I was in the US (NYC) last year and went to a music event at a bar. My girlfriend and I were there an hour early, so we grabbed a table of four near the front (we were meeting two other friends). When our friends arrived and sat down, we noticed that someone had left a jacket on one of the chairs at our table while we were sitting there (it wasn't there when we took the table).

We were a little confused but our friends sat down anyway. Right as the show was starting, an older guy came up and said that we were in "his" seat, as it had his jacket on it. He was pretty angry that we'd taken "his" seat, and we didn't feel like an argument, so we let him drag the chair off somewhere else, but it felt like he was being a bit of an asshole.

Is this a social thing in the US that I just don't get (I'm British) or was the guy just being an asshole?

Re:“So, …” What? on Sunday April 12, 2015 @01:21PM (#9364044)
It's painfully obvious to me that I have this linguistic quirk, because my fiancé (who is not a computer geek) interjects with "buttons!" every time I start a sentence with "So...".

This is annoying, but possibly not as annoying as listening to someone who starts half their sentences with the same word.

--

Thinking about it a little more, this habit is not specific to the computer / programming geek communities. I noticed others doing it around 2009-10, when I did almost no programming and didn't hang around with programmers. I mostly hung around with math and physics grad students. I suspect it is more generally a geek phenomenon, not specifically computer / programming geeks. Or possibly it's an even wider phenomenon than that - hard to say, since most of my friends are geeks of one sort or another.

It would be interesting to see if male and female geeks do it with similar frequencies. My guess would be that male geeks do it more often (based on the interpretation that starting a sentence with "So..." is a way of saying "I have given this topic serious thought" and the assumption that this is more likely something that a male geek will want to indicate than a female geek).

Re:I Am Sam Altman, President of Y Combinator. AMA on Friday March 20, 2015 @04:20PM (#9240455)
Everyone has a personal tolerance for risk. If you are diversified, then you decrease the risks that you are exposed to - possibly below your personal risk tolerance. That allows you to use leverage to increase your risk back up to your tolerance, which also increased your expected return.

So yes, diversification (plus leverage) absolutely increases expected value, if you hold risk a constant.

No - I just use a throwaway account by default (actually, several of them on different machines) because (a) sometimes I do want to comment on something without having my name attached to it, and (b) it's too much effort to switch between accounts depending on what I want to say.
I think it's something that's worth pointing out occasionally. Male programmers tend to assume that all other programmers are male. Even if they don't actually think that, it slips out in their language (as in this case).

In this case the error is a little perplexing since the OP's name is "Lexi" which is almost never used as a male name!

I'm kind of surprised that `enumerate` isn't defined in any standard libraries (as far as I know) since I need it pretty often.

After a while spent programming in Haskell you would probably develop your own mini-library of functions that make your life easier. Another one I often find useful is

  (.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
  (.:) f g = \x y -> f (g x y)
which e.g. allows you to define the absolute distance function

  dist :: (Num a) => a -> a -> a
  dist = abs .: (-)
A fun challenge is figuring out why the definition of (.:) is equivalent to

  (.:) = fmap . fmap

!
> It feels a little redundant to have to manually list out all the elements when the information is known statically, and updating the list will be necessary if the Peg type changes. In Racket, writing a macro for this would be trivial, but alas, this is Haskell. Perhaps there is a way, I’m just not aware of it.

A reasonably clean way would be to define

  data Color = Red | Green | Blue | Yellow | Orange | Purple
    deriving (Enum, Bounded, Show)
and then (e.g. in ghci) you can do

  >> [minBound .. maxBound] :: [Color]
  [Red,Green,Blue,Yellow,Orange,Purple]
I often define the useful function

  enumerate :: (Enum a, Bounded a) => [a]
  enumerate = [minBound .. maxBound]
for exactly this purpose.
I can't speak for other teams, obviously. But almost everything we do would fall under the heading of "Bayesian methods". It's such a broad term that it would be hard to write a trading algorithm that couldn't be described as Bayesian.
What Virtu does to make money (market making and latency arbitrage on a milli- and microsecond timescale) is very, very far away from recognizing chart patterns and trading on them!
What is being discussed in those links is commonly called complex systems theory[0] which is a mathematical/scientific/philosophical field concerned with how complexity (in the natural language sense of the world) arises from what appear to be simple natural laws. For example, how chaotic dynamics arise from deterministic systems, how biology arises from chemistry, or how consciousness arises from neural activity. It is connected to chaos theory, nonlinear dynamics and systems theory.

It is completely different to computational complexity[1] which is what is being discussed in Aaronson's article.

[0] http://en.wikipedia.org/wiki/Complex_system

[1] http://en.wikipedia.org/wiki/Computational_complexity_theory

Re:Spoofers Tricked High-Speed Traders by Hitting Keys Fast on Wednesday January 14, 2015 @05:50AM (#8885495)
You are not allowed to do it, full stop.
Re:Spoofers Tricked High-Speed Traders by Hitting Keys Fast on Wednesday January 14, 2015 @05:49AM (#8885490)
When most high frequency traders trade, they are not actively trying to manipulate the market for their own gain (in the cases where they are manipulating the market, they should of course be punished).

Most high frequency traders are trying to make money by providing liquidity, i.e. offering to buy and sell at a better price than the rest of the market. This benefits both the HFT (because they make money) and other market participants (because they can trade at lower spreads).

What these guys were doing was entering orders that they actively didn't want to trade, so that they could push around the price of the stock and repeatedly scalp a small profit. They had no intention of improving the quality of the market (either by narrowing spreads or improving price discovery). In fact they were actively making the market work less well, by impeding the process of price discovery with their "bluff" orders.

The whole point of a market is to be an efficient mechanism for matching buyers and sellers at a fair price. If someone is deliberately trying to distort the fair price, they are undermining the value of the market (and other market participants, not only HFTs, will suffer because their trades will no longer take place at the 'fair' price, but instead at the 'fair' price plus whatever direction the scalpers happen to be pushing it in at the moment).

Re:Spoofers Tricked High-Speed Traders by Hitting Keys Fast on Wednesday January 14, 2015 @05:41AM (#8885470)
Here's an interesting proposal - you charge a small amount (e.g. 0.001 of a cent) for every single order placement and rebate the proceeds to all market participants in proportion to how much volume they actually traded.

People who enter many quotes that they never trade on would be punished by this system (human traders and "flickering" high frequency traders alike) whereas people providing genuine liquidity, in the form of long-lasting quotes at a good price that they intend to trade, will benefit.

Re:Spoofers Tricked High-Speed Traders by Hitting Keys Fast on Wednesday January 14, 2015 @05:38AM (#8885459)
The market clears any matching orders in effectively zero time (that is, it runs its matching algorithm to clear the book before it allows any new quotes to enter).

After an order is matched, you can't cancel it except in exceptional circumstances (for example, you mistakenly entered an order very far from the bbo - in that case, with the cooperation of your broker and the counterparty to your trade, you may be able to unwind it).

However before the order is matched you are free to cancel it if you decide you no longer want to trade at that price (for example, you see some change in the fundamentals of the stock that causes you to no longer want to buy, or simply that the price moves in such a way that a buy/sell at your original price no longer looks like good value).

Re:Spoofers Tricked High-Speed Traders by Hitting Keys Fast on Wednesday January 14, 2015 @05:34AM (#8885451)
Are you suggesting that the API should read your mind to discover whether you really intend to trade on an order that you enter?
Re:The Simple Proof of the Tetris Lamp on Sunday January 11, 2015 @03:26PM (#8871161)
Theorem: No.

Proof: Any rectangle made of Tetris pieces must have an even number of squares (in fact, a multiple of 4) and hence the same number of black/white squares. Every Tetris piece except the T has the same number of black/white squares, hence the T cannot be used in any arrangement of a subset of Tetris pieces into a rectangle.

Re:That Debt from 1720? Britain’s Payment Is Coming on Sunday December 28, 2014 @05:42PM (#8807755)
Not necessarily. The standard way of valuing a bond is future value discounting. If the annualized interest rate between times 0 and T is r, then a payment of 1 unit at time T is worth

  exp(-r * T)
and a stream of payments C1, C2, ... CN at times T1, T2, ... TN is worth

  C1 * exp(-r * T1) + C2 * exp(-r * T2) + ... + CN * exp(-r * TN)
In particular, N can be infinite, so that the value of a never-ending stream of payments is

  C1 * exp(-r * T1) + C2 * exp(-r * T2) + ...
which can sum to a finite value. For example, if all the C's are constant, and T1 = 1 year, T2 = 2 years etc, then the present value is

    C * exp(-r) + C * exp(-2r) + C * exp(-3r) + ...
  = C * (exp(-r) + exp(-2r) + exp(-3r) + ...)
  = C * exp(-r) / (1 - exp(-r))
so, for example, if C = $1,000 and r = 4%, then the value of this infinite stream of payments is about $24,500 - so if you had to lend more than $24,500 for a 4% consol paying $1,000 you would be getting a bad deal.

This is before taking account of the possibility of default, which means that what you thought was an infinite payment stream turns out to be quite finite.

Right now, when interest rates are low, a 4% consol looks like a great deal. But you obviously can't buy a 4% consol at the moment. Maybe you could buy a 1.5% consol, if you're lucky.

Re:That Debt from 1720? Britain’s Payment Is Coming on Sunday December 28, 2014 @05:35PM (#8807738)
Sure, pounds sterling had a different value in 1720 (although the question arises - a different value in comparison to what? The US dollar and the Euro didn't exist in 1720! You could take a set quantity of gold as your comparison, but the value of an oz of gold has fluctuated more than the value of a pound sterling over the same period).

However, it is all a bit immaterial. If the debt was denominated in pounds sterling, then it will be repaid in pounds sterling. If it was in guilders, then it will be repaid in guilders (or in sterling, at whatever the current nominal sterling/guilder exchange rate is).

Re:Wave-particle duality is the uncertainty principle in disguise on Saturday December 20, 2014 @08:15AM (#8776557)
I don't think that

  log(a + b) = log(a) log(b)
is a rule I'm familiar with!