theoretical complexity: a G5 competitive strength

Some peers (such as LS) are good at climbing the corporate ladder. Someone must play the leadership roles in those MNC Asia offices, so if LS has a strong track record he would get it.

In Asia, I feel left behind on the slow track – painful, disappointing. In the US, immigrant techies are less likely to climb up (except some Indians). At thos moments, I often feel an inner competitive strength due to those competences that my peers are usually lacking, such as
– Threading,
– algos and data structures
– SQL hacks
– Perl/linux hacks
– math
– (non-trivial) jargon

These are among my top 3 competitive strengths. My sweet spot domains are typically

  • Complex
  • theoretically, and academically demanding, at least for the uninitiated
  • entry barrier
  • High value and high impact on the project
  • portable, unlike Quartz knowhow

In the US I have such opportunities, though nothing guaranteed.

std::lock_guard simple idiom]cod`IV

Since this data type is designed as a stack object i.e. scoped variable, simply declare (and initialize) this object within curly brackets. When this variable goes out of scope, the object behind the variable gets destructed.

In fact, the compiler sets up this sequence of events.

{
std::lock_guard<std::mutex> aLocalLock(sharedMutex);
someMutableShared ++;
}

BS-E is PDE !! SDE

I believe BS-equation ( a famous PDE) is not a Stoch differential equation, simply because there’s no dW term in it.

A SDE is really about two integrals on the left and right. At least one integral must be a stochastic integral.

Some (not all) of the derivations of BS-E uses stochastic integrals.

[12]back-scan any container,print`every Other item #MS

Have I overspent my time on this once-asked question?

The umbrella question — write a utility function to iterate any container and print out every Other element backwards?

Good coding practice! I think this is all about iterator syntax knowledge (my weakness) not algorithm (my strength)!

Note this is really about knowledge not  coding abilities. QQ not ZZ.

Iterator declaration is a can of worm 😦 I might need to give up on this.

#include <iostream>
#include <vector>
#include 	<list>
#include <set>
using namespace std;

template<class _InIt>  void printAlternateItem2itr(_InIt _First, _InIt _Last){
	bool flag = true;
	// if the iterator is from rbegin, then ++ would reverse it!
	for (_InIt it = _First; it != _Last; ++it, flag=!flag) {
		if (flag) cout << *it << ' ';
	}
	cout << endl;
}
template <typename CONT> void printAlternateItemBackward(CONT const & cont) {
	printAlternateItem2itr(cont.rbegin(), cont.rend());
}
int main() {
	//vector<int> cont = { 11,2,3,4,5,6,7,18 };
	//list<int> cont = { 11,2,3,4,5,6,7,18 };
	string cont = "0123456789a";
	set<int> cont2 = { 11,2,33,44,55,66,77,88,99 };
	printAlternateItemBackward(cont);
	printAlternateItemBackward(cont2);
	int arr[] = { 11,2,3,4,5,6,7,18,9 };
	int size = sizeof(arr) / sizeof(arr[0]);
	printAlternateItem2itr(arr, arr + size); //forward only
}

—-
Q: is comparison defined on all iterators?
A: now I think linked list doesn’t. Now I think only random access itr does.

%%Q: what’s the signature of STL find()? I will use those declarations of iterators in my function. (Actually the map and set containers have member functions find() outperforming std::find)

%%Q: from a const container, can u get a non-const iterator?

Q: why don’t you take a container as input? Why must you take iterators?
%%A: it’s more common to take iterator, but in this case container will do. All containers provide rbegin() or begin() including string. Raw array doesn’t but the iterator increment won’t work for raw arrays anyway.


Separate question
Q: OO design — how would you represent Order state transition graph in an OMS?

pre-retirement plann`: work till70]U.S.

Bigger than property investment, bigger than CPF annuity, bigger than my unit trusts is … healthy working condition.

Remember Connie’s PR chart? My Prime years could extend beyond 55, towards 70 .

In the US I could work till 70 and possibly branch out to other domains of specialization. Singapore only respects medical specialists.

Q: what aspects of health?
A: diet, fitness
A: weight
A: cardio
A: sleep

low-churn professions often pay lower#le2Henry

category – skillist, gzThreat

I blogged about several slow-changing professions — medical, civil engineers, network engineers, teachers, quants, academic researchers, accountants (including financial controllers in banks).

My overall impression is, with notable exceptions, many of the slow-changing domains don’t pay so well. We will restrict ourselves to white-collar, knowledge intensive professions.

Sometime between 2013 to 2015, a tech author commented — compared to the newer languages of javascript, ruby, objective-C etc, java programmers are a more traditional, more mature, more stable, more enterprise community.

https://bintanvictor.wordpress.com/2014/11/03/technology-churn-ccjava-letter-to-many/ is my comparison of java, c#, c++. Basically I’m after the rare combination of

– mainstream,
– sustained, robust demand over 15 to 30 years
– low churn

Someone mentioned entry barrier. Valuable feature, but I think it is neither necessary nor sufficient a condition.

SQL and shell scripting are good examples. Very low churn; robust demand, mainstream. Salary isn’t highest, but decent.

I can qualify as tech lead on___(system)

Q: what kinda systems can you be an architect or lead developer? See also ##a few projects technically too tough4me

A: In an optimistic mood …

domain firm tech used cfd personal advantage
trade execution b2b sql, tibrv  4
blotter + backend #essential to any citi sql  3
mkt data parser ICE socket  3
bond repricing/risk engine reo sql, async  4 bond math, curve-based pricer
billing, commission PWM SQL, batch  5
STP none sql, batch, MOM  3 SQL
java web … PWM sql, batch  5 many
web … Catcha, NIE lamp, javascript  5 many

I can get these systems to work, although

  • I’m not the fastest
  • i may not use latest, most efficient technology
  • reliability and stability ?
    • Look at GMDS .. MMF is an unstable base technology
    • LOok at Gauardian ssh? not a mature , well adopted base technology

app owner^contractor#German6Y

Q: Look at my current per-hour value-add to the team. How many percent of that value-add is portable to next two jobs?
%%A: I feel it’s usually rather low. My value-add is mostly about local system knowledge.

Current value-add/hour to the current employer does increase over the years and grows with relationship.

According to German, in the big banks, many team managers badly need an owner-developer, a system expert to remain with the system for 3-6 years. However, on Wall St and London, there’s a long tradition of hiring (proven) high-caliber contractors as the “big guns” to get through a tough project. eg: Song Jun

eg: Rob in the Stirt tech team
eg: bloomberg

Also, from budgeting point of view, a system needs a long-term owner (like BAU), whereas a project needs temporary manpower. So that’s one difference between a lead developer vs a big-gun contractor.

The owner-developer often earns more than the regular contractor but not sure about “big guns”.

Promotion to owner-developer is not guaranteed simply by staying for x years because

  • there may be other old-timers
  • even after 4 years some parts of the system may still be unfamiliar to you
  • even after 10Y on the system, you have below 50/50 chance to build credibility and position to convince everyone to follow your suggestions. Look at Kevin’s influence after just a few years on the system.

For me, it doesn’t make sense to get very familiar with a local system and become efficient and a “powerful” local system expert. Yes the manager would appreciate my value but

  • it often takes 2+ years and a lot of learning effort (Does it cause aging? Only if excessive stress.)
  • Still, for many years the existing experts may remain more powerful than you, so manager may not appreciate your value as much as you expected.
  • the learning effort takes away from my “body-building”
  • Depending on context, it offers only 50% protection from job loss. Sadly, due to lack of body-building, you may become weaker on the new job market.
  • the appreciation seldom translate to meaningful compensation

Tower property i.e. law of iterated expectations

cat: mathStat

E Y = E [ E Y|X ]

I find this "theorem" too abstract and can be presented more intuitively.

Key – the E is unconditional expectation except in the inner context.

Discrete Example — I invest in 6 funds from Vanguard; wife invests 3 funds; grandma invests 2 funds. Each fund posted a return over the last calendar year. What’s the average return across my family? For simplicity assume $1k in each investment.

One way to look at is "how often does each value of Y contribute to the average"

The "E Y" method counts how many times FundA shows up in our combined portfolios, regardless the individual.

The E [ E Y|X ] method counts the relative weight of FundA within my portfolio first, then multiplied by the relative weight of my portfolio within the family.

tech specialization: no opp2play%%strength ]sg

In the US I can slowly steer my tech specialist career into my chosen strategic domains of specialization like
– threading
– cpp
– financial analytics
– big data
– statistical analysis
– risk analytics

In many of these domains, most of my peers struggle while I am comfortable…. more confidence, more leisure, more free time, less stress ..

In Singapore, I don’t have the luxury because there are Simply too few jobs at my salary level. Those specialized jobs there are, are simply too selective too demanding

— OC: wanted to go deep into drv pricing..

–stirt: wanted to go into curve building and real time risk but ..

–Mac: wanted to go into quant dev …

removing outlier in Monte Carlo

In a monte carlo simulation, I feel we should never remove any outlier.

The special event we are trying to capture could be an extreme event, such as a deep OTM option getting exercised. Perhaps one in 9 billion realizations is an interesting data point.

Removing any outlier would alter the probability distribution. So our Monte Carlo estimate is no longer unbiased estimate.

However, if there’s a data point with operational or technical error it needs to be removed. Not removing it would also mess up the probability distribution.