the base Delegate class isn’t a delegate type

Q: Why is the base Enum class not a enum type?
I feel an instance of this particular class has no integer representation, unlike an enum instance.

Q: Why is the ValueType class not a value type?
I feel this class exists to provide a suitable Equals() and GetHashCode() suitable for most structs. I feel this is like an empty abstract class. I feel it has no field, so copying a ValueType instance should not be a copy by value.

Q: why is the Delegate class not a delegate type?
I feel this type doesn’t specify a method signature and doesn’t have an inv list

what kind of entity is "str" in a python script

(Warning — for a novice introspection is overly powerful and complex in dynamic languages like python. You won’t get to the bottom any time soon.)

Everything (except literals and operators) you see in a python script is usually one of

– a variable name
– a reserved keyword like for/while, import, in,
– module name like re, string, os. I think these are actually dictionaries
– a type-friendly builtin function — you can put the identifier into type() and dir() — like round, type.
– a type-unfriendly builtin function — print, ..

* “str” is a very strange animal. It’s a function, but type(str) says it’s a typename
* “print” is a strange animal. You can’t examine it using dir(), type()

Python docs list all builtin functions, but a few won’t “type” as builtin function — str, print, type, tuple…

For this sort of investigation, you need a few instrumentation tools — str(), repr(), type(), dir(). I call these meta-functions. They operate on other functions, variables ….

try
print dir(type)
print dir(str)
print dir(dir)

factory-method vs FactoryBean.java in Spring

I feel there’s deeper and richer support for FactoryBean.java. Notes from spring doc —

— “factory bean” vs FactoryBean —
When the Spring documentation makes mention of a ‘factory bean’, this will be a reference to a bean that is configured in the Spring container that will create objects via an instance or static factory method. When the documentation mentions a FactoryBean (notice the capitalization) this is a reference to a Spring-specific FactoryBean.

— getting the FactoryBean object itself —
Finally, there is sometimes a need to ask a container for an actual FactoryBean instance itself, not the bean it produces. This may be achieved by prepending the bean id with ‘&’ when calling the getBean method of the BeanFactory (such as the ApplicationContext bean factory).

So for a given FactoryBean with an id of myBean, invoking getBean(“myBean”) on the container will return the product of the FactoryBean, but invoking getBean(“&myBean”) will return the FactoryBean instance itself.

which city is at the spearhead of finance IT

Even if Asia IT jobs were to pay higher than US, US is still spearheading industry best practices. I’m in the financial IT space, but see similar patterns in other IT sectors.

It’s revenue share, stupid.

The more revenue a country office generates, the more budget it controls. The office usually prefers onsite development team, so that team tends to become the hotbed of innovation. For a foreseeable future, NY and London will be the hotbeds.

American vs European call option valuation

Hey Hai Tao,

My CFA textbook had a conclusion I don't believe.

Say there is a microsoft stock call option expiring 7/1/2011, X = $20, in-the-money, American style
Say there is an identical microsoft call but European style.

Assumption: the underlying stock makes no dividend or other cash payment before expiration.

Under this assumption, textbook says both call options are worth the same.

Earlier the same author said that an American option is worth at least the same as an European style option, but under this Assumption, he claims they have equal valuation.

As a Layman, my intuition tells me the American option is more valuable. Suppose my analysis tells me Microsoft might drop to $19, then the American option lets me pay $2000 today for 100 shares and sell today at $2467, earning a profit of $467. The European option may expire out of the money and worthless.

Do you agree?
Thanks.
tanbin

some trading system modules are more necessary than others

“non-optional + non-trivial” is the key.

Context – trading systems.

I feel trade booking/capture is among the “least optional”. Similarly, settlement, cash mgmt, GL, position database, daily pnl (incl. unrealized). Even the smallest trading shops have these automated. Reasons – automation, reliability, volume. Relational Database is necessary and proven. These are Generally the very first wave of boring, low-pay IT systems. In contrast a lot of new, hot technologies look experimental, evolving and not undoubtedly necessary or proven —

* Sophisticated risk engine is less proven. I don’t know if traders really trust it.
* Pre-trade analysis is less proven.
* huge Market data often feed into research department, risk/analysis systems. I feel some small portion of market data is necessary.
* models
* Algo trading, often based on market data and models
* object DB, dist cache, cloud aren’t always needed
* MOM? i guess many trading systems don’t use MOM but very rare.

Quiz: who to "intercept" returns from a java method

Jolt: When you put in a “return”, you think “method would exit right here and bypass everything below”, but think again! If you use a return in a try{} or catch{}, it is at the /mercy/ of finally{}.


P477 [[ thinking in java ]] Only one guy can stop a return statement from exiting a method. This guy is finally, also mentioned in one of my posts on try-catch-finally execution order.

Same deal for break, continue.