Labels

_fuxi (75) _IV (146) _misc (5) {610610 (30) algo (1) automatedTrading (8) banking/economy (3) book (14) c++misc (125) c++real (15) c++STL/java_container (7) cppTemplate (1) db (13) DB_tuning (4) deepUnder (1) dotnet (69) eTip (17) excelVBA (12) finance+sys (34) financeMisc (24) financeRisk (2) financeTechMisc (4) financeVol (21) finmath (17) fixedIncome (25) forex (16) IDE (24) invest (1) java (43) latency (4) LinearAlgebra (3) math (30) matlab (24) memoryMgmt (11) metaPrograming (2) MOM (15) msfm (1) murex (4) nofx (11) nosql (3) OO_Design (1) original_content (4) scriptUnixAutosys (19) SOA (7) socket/stream (15) sticky (1) subquery+join (2) swing (32) sybase (6) tech_orphan (12) tech+fin_career (30) telco (11) thread (21) timeSaver (13) tune (10) US_imm (2) US_misc (2) windoz (20) z_algo+dataStructure (4) z_arch (2) z_c#GUI (30) z_career (10) z_career]US^Asia (2) z_careerBig20 (1) z_careerFinanceTech (11) z_FIX (6) z_forex (31) z_hib (2) z_ikm (7) z_inMemDB (3) z_j2ee (10) z_oq (14) z_php (1) z_py (26) z_quant (4) z_skillist (3) z_spr (5)

Tuesday, May 12, 2015

DRW IV

a vector needs to allocate N instances of Account but Account has no default ctor. How does the compiler achieve it?

A: indeed the call to array new would prevent the vector<Account> concrete class from compiling due to SFINE rule or something like that. (Java and c# would use type constraints instead.) The compiler must be using 2 separate lines – one to allocate raw memory, the other to initialize the object.

 

However, when is vector internal array allocated by array new? I discussed with Ashish but found no answer.

 

Q: why do you need to write your own smart ptr?

A: super simple one, just to deal with some issue of the raw ptr... probably dangle pointer, by overriding the deref operator?

 

Q: why use unique ptr when shared ptr is general purpose

A: threading...

 

Q: is the lambda functionality doable in c++98? what is the c++98 equivalent?

 

Q: OK you don't use c++11 at work, but do you hack around at home?

 

Q: why is  the bid/ask spread much wider in options than the underlier?

A: must be the risk to the writer. Competition didn't drive down the bid/ask spread like it did in FX and cash equities.

AA: delta hedge adjustment can't be done every second. Before the next adjust, the risk to the writer (market maker and quoter) would be quite high.