Nuclear Phynance
http://www.nuclearphynance.com/
The underground quantitative finance forum.en-us5NuclearPhynance Logo14047http://www.nuclearphynance.com/RSS/images/Nuclear%20Phynance%20RSS%20Feed%20Logo.png
http://www.nuclearphynance.com
Nuclear Phynance Reactor CoreProblem with R code, with option pricingI don't know if this is the right place to post this, or if anyone can help with this, but I am having problems with my R code not producing accurate results. I am trying to implement the Carr-Madan approach to option pricing, using the Black-Scholes model. The formula can be found in equation (6)on page 64 here:http://engineering.nyu.edu/files/jcfpub.pdf. I am using the FFT with simpson weights (eq(22)) to try and approximate the integral, however the results aren't as near as they should be. My question is can you tell me where I have gone wrong with my code, or if I have made an error?<br><br>R code:<br><br>#The characteristic function of Black-Scholes model<br>cf=function(S_0,mu,sigma,T,u){<br>im=complex(real=0,imaginary=1)<br>x=exp(im*u*(log(S_0)+(mu-((sigma**2)/2))*T)-(((sigma**2)*T*(u**2))/2))<br>x<br>}<br>#The psi function (eq(4) in link)<br>psim=function(r,S_0,mu,sigma,T,alpha,v){<br>im=complex(real=0,imaginary=1)<br>u=v-(alpha+1)*im<br>x=(exp(-r*T)*cf(S_0,mu,sigma,T,u))/(alpha**2+alpha-v**2+im*(2*alpha+1)*v)<br>x<br>}<br>#function used in the simpson weights<br>kdf=function(x){<br>if(x==0){<br>result=1<br>}<br>else{<br>result=0<br>}<br>result<br>}<br>#function used in simpson weights<br>kdfn=function(x,N){<br>if(x==N){<br>result=3<br>}<br>else{<br>result=0<br>}<br>result<br>}<br>#FFT of the eq(6) in the link<br>callcm=function(r,S_0,mu,sigma,T,alpha,N,h){<br>im=complex(real=0,imaginary=1)<br>v=seq(0,((N-1)*h),by=h)<br>eta=h<br>b=pi/eta<br>lambda=(2*pi)/(N*eta)<br>u=seq(1,N,by=1)<br>k_u=-b+lambda*(u-1)<br>f=function(i){<br>sum=0<br>for(j in 1:N){<br>sum=sum+((exp((-im*lambda*eta*(j-1)*(i-1))+im*v[j]*b)*<br>psim(r,S_0,mu,sigma,T,alpha,v[j]))*(eta/3)*(3+(-1)**(j)-kdf(j-1)-kdfn(j,N)))<br>}<br>sum<br>}<br>result=sapply(u,f)<br>result=((exp(-alpha*k_u))/(pi))*Re(result)<br>result<br>}<br><br>I've been using parameter values:<br>N=2^11<br>h=0.01<br>S_0=210.59<br>T=4/365<br>r=0.002175<br>alpha=1<br>mu=r<br>sigma=0.1404<br><br>But have at best been getting results that are correct to 2 dp, whereas I am led to believe I should be getting results as accurate as say 10^-14. So any help on where you can see errors in my formulation or the code would be much appreciated thank you!
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184087
quithatingPricing & ModellingSat, 18 Feb 2017 20:07:23 GMTCorrelated Jump diffusion modelsHi all, <br><br>very quick question: have you ever come across a simple jump diffusion model like Merton for which dW (the Brownian0 and dN (ie. the Poisson) are correlated? <br><br>Any paper reference is very much appreciated.<br><br>Thanks a lot
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184082
TyszuiPricing & ModellingFri, 17 Feb 2017 20:24:21 GMTCan I get some advice about optimizing this algorithm?Know values: matrix(n x m)—— X,F and Delta; vector—-u;<br><br>wanted value: vector—— w;<br><br>restrictive condition：<br><a href="https://qph.ec.quoracdn.net/main-qimg-38130fa4d02ad9a90a75e692022cfce9">pic</a><br><br>Now shall I set vector — ‘w’ to get the biggest value of R/P?
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184077
vx2008Risk ManagementFri, 17 Feb 2017 12:04:00 GMTHong Kong DrinksI will be in Hong Kong Monday 20th February 2017 to Wednesday 22nd.<br><br>Monday night is open for drinks at the moment.<br><br>Any NPers obviously. <br><br>But particularly if:<br>a) you have been tinkering with a systematic trading strategy but need infrastructure and capital<br>b) you want to invest in a dynamic portfolio of systematic strategies<br><br>Scotty<br><br>
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184065
ScottyOff-TopicWed, 15 Feb 2017 03:01:40 GMTCV/interview advice: whether to mention the track record in PA and how?Hi<br><br>I have been working as a quant on the sell side. I have been actively involved with time series analysis and trading strategies for vol and correlation trading but it was mostly to manage risk from the flow and structured business. <br><br>However, I have built up my own quant trading model combining the three strategies: carry, trend and vol, and run it with my own money. I have had a good performance so far for the past 4 years with returns about 20% p.a. each year and vol of about 20-25%.<br><br>I now keen to work as a quant researcher or a junior PM on the buy side and I am planning to apply to a few places. I have a good academic background and programming experience so I am confident on the technical side. The only drawback is that I have no experience in professional risk/money management and no experience with the buy side, apart from my trading experience in PA.<br><br>Do you think it makes sense to mention my experience with quant trading and track record in my PA? If so, the should I do so in the CV, cover letter or during the formal interview?<br><br>Thank you<br>
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184044
chikaCareersSat, 11 Feb 2017 10:02:39 GMTEstimating price impact in the opening auctionI should start by stating that I trade crap (messy, illiquid listed US equities). So, while my typical trade size is modest in dollar terms, it can often be enough to cause price movement. I'm trying to properly quantify this impact for my MOO orders but there are a few things about my approach that I find troubling. Here's what I'm currently thinking: <br><br><br>1) For opening auctions where I did not participate, measure the average price difference between the official opening price and the 9:28am (opening orders deadline) mid price. I expect this to be zero. <br><br>diff = ln(openPx / mid928)<br><br>avgDiff = [diff(1) + diff(2) + ... + diff(n)] / n <br><br><br>2) Repeat step 1 for auctions that I did participate in and calculate the adverse movement. For simplicity, I'll assume all buy orders here. <br><br>if BUY order: <br><br>myDiff = ln(openPx / mid928)<br><br>adverseMove = myDiff - avgDiff<br><br><br>3) Run a regression against my order size (as % of ADV) and the adverseMoves to get an idea of the sensitivity to position size<br><br><br><br>-The first issue I have with this is that the bid/ask spreads at 9:28 for this illiquid stuff are often nonsensical. Garbage in, garbage out. <br><br>-The second problem I can see is that there is some alpha here so I'd expect some adverse drift from 9:28 until the open regardless of my order being present or not<br><br>-Lastly, step 3 should probably be normalized for volatility. I could either include historical vol in the regression or perhaps only compare each stock against itself when calculating adverse moves. The latter would be somewhat of a pain to manage. <br><br><br>Anyone have a helpful suggestion or two? Or perhaps I should be taking a different approach entirely? <br><br>Appreciate any input. <br><br>
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184025
bs2167TradingWed, 08 Feb 2017 18:58:12 GMTPhD quantitative finance graduate looking for entry level positionDear NuclearPhynacists! Great forum, great community!<br><br>I have finished my PhD in quantitative finance from with a thesis on derivatives pricing and hedging and exchange traded products, featuring analytical, numerical and empirical methods. It comprises 4 papers, 3 of which have been published in peer-reviewed international journals.<br><br>I also hold a MSc in theoretical physics having done a thesis on lattice QCD.<br><br>And last but not least, I am a skilled programmer with many years experience (both paid, for my research and as hobby) with C++, Haskell, full-stack web, databases, and have several high quality projects published (on github.com).<br><br>I am looking for a quantitative position (systematic trading, quant analyst, quant researcher, financial engineer), ideally front office of a major quant hedge fund, trading firms or investment banks, world-wide, though US/UK is preferred.<br><br>I would be happy to hear from others that started from a similar background and to get tips on how to proceed.<br><br>Do headhunters make sense for such entry level positions, given, that most shops have permanent job openings on their sites and seem very responsive (e.g. Jane Street, G-Research)?<br><br>Would you be willing to recommend good headhunters?
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184024
chain_reactionCareersWed, 08 Feb 2017 16:31:34 GMTCBOT/CME Historical Security masterHello,<br>I'm hopping someone here can recommend a solution to my problem. I'm looking for something like a security master for a certian collection of options that have ever been listed on the CME\CBOT exchanges. So for example I would like to know every strike\expiry date for every option ever listed for lets say TY options. Specifically I'm not looking for the market data. Just the universe of listed securities. I'm more then willing to pay for this data. Surprisingly, as it seems right now, the CME does not have this data going back past a certain point (Something like 2007). Just to be clear, they have the settlemet data, but not the expires before a certain point.<br>Does anyone know where I can source something like this?<br>Thanks for the help
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184021
stas_oBasicsWed, 08 Feb 2017 13:19:10 GMTProfessional Grade Trading PlatformsI recently moved to algo-trading from Risk/Tech and working with a fundamental PM in automating her strats. We are in the process of picking a platform and broker to do this work on. Our language of choice is Python since we are doing latency sensitive work and ability for the PM and traders to eventually tinker with algos (especially screeners) is important. <br><br>We checked out the BB fix offerings and they are pretty bare bones. Definitely doable but I am wondering if there are any smaller offerings that we are not aware of. Interactive Brokers offers something equivalent to BBs but it doesn't seem to be very differentiated. <br><br>Note that we are only looking at the Futures markets.<br><br>Thanks!
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184007
OrthogonalTradingTue, 07 Feb 2017 13:40:00 GMTShort end of the curve: swaps vs treasuries Hello,<br><br>Could someone explain pls the difference in the US swap rates vs treasuries at the short end of the curve? <br>I find it difficult to beleive that it's all due to the credit risk premium.<br><br>Thank you in advance!
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=184006
gillTradingTue, 07 Feb 2017 12:27:59 GMTThe magic of the compound interest rateManhattan was bought for 60 Gulden in 1626, which is often considered to be a one of unfairest deals in the history. However, had Native Americans invested this money under 6% p.a., they could have bought the Manhattan back with all current real estate four times! <br><br><img id=EO-IDKey-13026 src="/User Files/7545/Manhattan_and_6_CAGR.png"><br><br><br><a href="https://letyourmoneygrow.com/2017/02/04/numeracy-traders-lesson-2-exponentiation-polynomials-logarithms-power-compound-returns/">https://letyourmoneygrow.com/2017/02/04/numeracy-traders-lesson-2-exponentiation-polynomials-logarithms-power-compound-returns/</a>
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=183985
finanzmasterArtSat, 04 Feb 2017 21:54:40 GMTbooks of 2017I’ll start the thread for this year. Came across <a target="_new" href="http://www.newyorker.com/podcast/fiction/dave-eggers-reads-roddy-doyle">Roddy Doyle</a> and then checked out <u>The Snapper</u> and <u>The Woman Who Walked Into Doors</u>.<br><br>Bell Hooks: <u>The Will to Change: Men, Masculinity, and Love</u>
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=183949
RashomonOff-TopicSun, 29 Jan 2017 21:58:57 GMT"Balkanization" of culture & commerce - wonderings on the futureGiven the unique vantage points of folks like yourselves on this forum where global commerce & politics are concerned, i.e. considering economic cause & effect, thought I'd start a discussion for anyone interested...<br><br>The 'big picture' of socio-economics definitely seems to be centered on globalization/consolidation, but do you think there are any incentives at the national level for a 'top-down' plan to increase localization of supply chains, infrastructure security/communications, etc?<br><br>With Trump now in the big house, the populist perception is that we're cutting ties with many countries and becoming "isolationist" which, in regard to stability of supply chains and web security might not be such a bad thing...I'm not trying to make a political statement for or against here, just a perception.<br><br>Seems a lot of the younger adults in affluent areas of the U.S. (Portland, Seattle, Austin, etc) favor a localization movement for food & such, but I wonder about other things, such as making local cybernetworks ("Intranets" perhaps). The first word that came to mind for this was 'balkanization' which seems to be a dirty word, and there are more than several articles on various sites with titles involving 'balkanization of the internet,' but again, I think it wouldn't have to be so all-or-nothing, black-and-white. There obviously could be plenty of interchange with the outside world where 1st Amendment-type issues are concerned, but for commerce and security of such, I wonder if a good medium could be achieved.<br><br>Take that rambling as you will...any thoughts welcome.
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=183942
JTDerpOff-TopicSat, 28 Jan 2017 21:34:17 GMTShould I really be selling vol now ?With VIX being so low right now, even if I expect some single stocks vol to either continue being so low or going to be even lower (after events maybe), should I even be selling vol/gamma now considering when VIX picks up it could well be greater than difference between the implied and my expected future vol. <br><br>Should I either keep selling with more frequent hedging scheme ? Or should I long vol/gamma and hedge infrequently?
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=183929
peter.russellTradingFri, 27 Jan 2017 13:16:30 GMTChecklist - Open SourceWondering if anyone knows of a good, open source and host-able checklist product.<br>I've seen commercial ones - where you can create say a daily list of tasks - which repeats- some that repeat on a weekly/month/quarterly basis - and can see them in a calendar - but can also write to them by API when things are done by other scripts etc<br><br>Closest I can find seems to be Bitrix24 - but that is meant for very different tasks...
http://www.nuclearphynance.com/Show%20Post.aspx?PostIDKey=183926
HitmanHSoftwareThu, 26 Jan 2017 22:27:21 GMT