Monday, October 29, 2007

We're Hiring - Searching for a Quantitative Analyst

For the past few years I've been working for a global investment firm. At the beginning I worked part-time as a freelancer, but recently the company opened an R&D facility in Herzliya and now I'm a full time employee again. We're now looking for exceptionally talented quantitative analysts, to participate in the development, validation & documentation of risk & analytical applications and processes.

Our firm has been engaged for over 10 years in the research and development of systematic trading models for the global financial markets. The developed models are used in the actual money management of clients' portfolios.

Role will involve working on new risk management models, data extrapolation, and trading model analysis and development.

Requirements:

· MS or PhD in Math or Physics

· Exposure to stochastic calculus

· Excellent general modeling skills

· Grasp of PDE’s and Monte Carlo

· Experience in statistical data analysis or signal processing is a plus

· Experience in Matlab \ C# is a plus

· Financial knowledge is a plus

To apply, fax your resume and a cover letter to 09-970-7329 or email careers@eaglets.com

Grrrr... I hate bad documentation! or: "An INSERT EXEC statement cannot be nested"

I recently had to extensively use a feature in SQL I seldom used before - inserting the results of an EXEC statement directly into a table. Sounds a reasonable thing to do, right? Accidentally, I had a bunch of stored procedures calling each other, using temporary tables, and finally filling a "final" table. I finished writing the whole thing, and then - BABOOM! - it doesn't work, because "An INSERT EXEC statement cannot be nested". Huh? What?
Why? Why didn't you say so before?

Following is a quote from SQL Server Books Online for "INSERT (Transact-SQL)" :

execute_statement

Is any valid EXECUTE statement that returns data with SELECT or READTEXT statements. The SELECT statement cannot contain a CTE.

If execute_statement is used with INSERT, each result set must be compatible with the columns in the table or in column_list.

execute_statement can be used to execute stored procedures on the same server or a remote server. The procedure in the remote server is executed, and the result sets are returned to the local server and loaded into the table in the local server.

If execute_statement returns data with the READTEXT statement, each READTEXT statement can return a maximum of 1 MB (1024 KB) of data. execute_statement can also be used with extended procedures. execute_statement inserts the data returned by the main thread of the extended procedure; however, output from threads other than the main thread are not inserted.

Did you see any clear mention of this limitation???

Thursday, October 25, 2007

SQL Table Variables - Limitations

I've come to really like table variables in SQL. They are a nice and natural development of database programming. And, when used smartly, can greatly improve performance compared to using temporary tables.

Today I've discovered that table variables cannot be truncated. I had no idea...

Anyway, I've found a cool source of more information about table variables, including some stuff that is not or not well documented in Books Online. Check here and here.

When you think of it - it makes sense. As far as I know, table variables are memory constructs whereas temporary tables are kept in tempdb. Truncating a table simply removes the reference of the table's page from the database. However, if the table is only kept in memory and in no actual database - it has no meaning...

Wednesday, October 24, 2007

I type at 48.1 wpm and 97.2% accuracy

I took the typing test everyone talks about, here are the results:

Number of words typed: 144
Test duration: 3 min
Speed: 48.1 words/min. (240 keystrokes/min.)
Error penalty: 4
Accuracy: 97.2%

It's good, but I've got a lot to improve. I must say it made me quite nervous - causing me to make several time-consuming errors (didn't get high accuracy for nothing). Also for me, writing code goes way faster (even before counting Intellisense, Resharper and the like in) than text I've never seen before. There are some words, or parts of words that I can just type at lightning speed (new, class, for, if, the, select, from, ...)

Confession

Scott Hanselman, THE blogger, has a very interesting post about The Five Second Rule. Actually, the comments are the most interesting...

I was born in Belgium, moved to Israel at 13 and have been living here ever since (almost 20 years). I've never heard of this rule.

I must, however, confess that when I was a little child I would scratch chewing gums off the ground and eat them with no second thought. I did this until one day my sister Tali saw me, utterly shocked, and gave me an important lesson in hygiene...

Tuesday, October 16, 2007

I miss my const methods

Yet another thing to add to the list of things I miss in C# - the ability to define a method in a class that is guaranteed (by the compiler!) to not change the state of the object (like const methods in C++).

I don't understand the implementation of System.Double

Take a close look at the implementation of System.Double (use Reflector or any other dissassembler).

Look, for example, at the following excerpt:

public const double PositiveInfinity = (double)1.0 / (double)0.0;
public const double NaN = (double)1.0 / (double)0.0;

 


Huh?!?! What ?!!? Why ?!?!


Of course, I had to run and check:

double myNaN = double.NaN;
bool isInf = (double.IsPositiveInfinity(myNaN));
// isInf is set to FALSE

double myInf = double.PositiveInfinity;
bool isNaN = (double.IsNaN(myInf));
// isNaN is set to FALSE

 


It doesn't end there. Look at the implementation of IsNaN:

public static bool IsNaN(double d)
{
return (d != d);
}

 


All'n'all, I must confess I can't make any sense of all this!


I promise to publish if/when I do.

Google - what are you cooking

[UPDATE: Apparently I was a little bit late at noticing. See here for a news article on the subject dated October 15th.]

Only a week ago, my GMail account had an allocation of less than 3GB. Two days ago it crossed the 3GB line, and now it's almost 3.5GB.

Call me crazy, but I think there is something behind this. Is Google about to (at last!) remove the "Beta" label from this great product? Are they about to take over some big data storage firm?

What's up big G ? You're up to something, I know it...

Why Double.IsNaN

If you have a double value set to NaN you can check that it's NaN only through the Double.IsNaN method. MSDN quote: "Use IsNaN to determine whether a value is not a number. It is not possible to determine whether a value is not a number by comparing it to another value equal to NaN."

In other words, there is no guarantee that (Double.NaN == Double.NaN).

A simple question - WHY ?

Sunday, October 14, 2007

Wine is better than Water

I just got this in my mailbox. I rarely read, let alone forward, this kind of mails. Yet, it came from a person I trust and who avoids sending stupidities (thanks Yuval!) and I really feel I ought to pay it forward...

"

As Ben Franklin said:
In wine there is wisdom, in beer there is freedom,
in water there is bacteria.


In a number of carefully controlled trials,
scientists have demonstrated that if we drink 1 liter
of water each day, at the end of the year we would
have absorbed more than 1 kilo of Escherichia coli,
(E. coli) - bacteria found in feces. In other words,
we are consuming 1 kilo of poop.


However, we do NOT run that risk when drinking wine
& beer (or tequila, rum, whiskey or other liquor)
because alcohol has to go through a purification
process of boiling, filtering and/or fermenting.

Remember: Water = Poop, Wine = Health

Therefore, it's better to drink wine and talk
stupid, than to drink water and be full of shit.

There is no need to thank me for this valuable
information: I'm doing it as a public service.

"

Defining a Startup company

First, I would like to draw your attention to this post (and blog in general): 

Defining a Startup company « First steps in the Hi-Tech sales world .

It's maintained by a guy (I think) who writes anonymously about his experience in the Hi-Tech world. I usually don't fancy anonymous writers, but this is the exception that confirms the rule - by being anonymous he allows himself to be free of any politically-correct barriers, and not being afraid of being sacked by writing what he thinks about his work and employer. The result is well-written, interesting, thoughtful, funny, and still written with style and manners. Give it a try, you'll like it!

Anyway, I'd like to asses the issue of defining a Startup company. Inevitably, I had to check what Wikipedia had to say. The emphasis there is more on the company's age ("limited operating history"), size and potential growth. In general, they are more concerned with the financial aspect of the matter - a Startup company is a company that is highly scalable and can produce huge ROI very fast. They also mention that it usually focuses on creating a product, rather than providing services.

In The Beginner's other post and comments, people related more to the atmosphere at work:

Not Startup (anymore):

"When you have a purchase order system in place that is automated and requires the signatures of half the company (company size is irrelevant here) for a purchase of a paper clip."

"Feeling like a small bolt in a large machine where you can no longer influence anything"

"people covering their asses by adding the whole company on every email they send"

"working your ass for some idiot that has a reserved parking space that is never occupied before 9:30 am or after 5:30 pm, who is earning 5 times your pay and who’s only donation to the company is when he keeps his mouth shut and doesn’t generate any trouble by releasing another stupid decision"

 

Still Startup:

"A small place, good atmosphere, people working all to one goal."

"the added bonuses - a pool table, cool offices, or some other crap"

 

IMHO, there is no single definition to a Startup company. I've seen companies of 15 that could never be considered a Startup, and worked together with almost 150 other employees for a superb Startup. In every company you have smart people, and those who are smarter, you have "the company ass-hole", and after you've worked for a place enough time - some things start bugging you badly, Startup or not.

So where should the line be drawn?

Well, I think that there are many parameters involved. No Startup fits all of these parameters, and some of the parameters are purposely vague, but in general, a company who complies to most of these parameters, is likely to be, to some degree, a Startup company. Almost sounds like a Fuzzy Logic rule...

So here is my (incomplete) list, in no particular order:

  1. Size - a Startup company must be small. At least it should feel small to the employees as well as to the outside world. I've worked for a company with almost 150 employees who still felt small, but that's rather uncommon, and very difficult to achieve.
  2. Age - the company and employees must feel young. It doesn't mean you can't have workers of 50+. If you even have one, young, important and charismatic individual - it could do the job. I've also seen companies where people of 30+ were called "the eldest", and still the company felt old. So don't go firing all your guru's with 20 years of experience now!
  3. Speed - in a Startup company, things move fast. Decisions are taken on the spot. The word "process" is only used as a running instance of a computer program! The overall mood can switch from one extremity to the other in a few minutes. People walk fast in the corridors. There is action in the air!
  4. Belonging -  people feel they belong to something great. There is a purpose to your work. When someone asks you something, you help him because you want him to succeed, knowing it will help us. You'll delve into his problem until completion, even if you'll have to solve it yourself.
  5. Believing - employees must know and believe in the company's goals and capability to reach these goals. They must also feel that they are making a difference - they must believe in their ability to impact the company's success.
  6. Potential - it should be evident that, in all matters (company size, sales, products, ...) - there is much more to be done than that which has been done. There should be a feeling of huge potential. Also, employees should have the feeling that once part of this potential will be achieved, they will be significantly compensated financially (stock options, bonuses, etc.).

(Note: I feel I haven't finished this post - I'll complete this list later on...)