Monday, November 23, 2009

Risk Reversal or Synthetic Long Stock Position

A "Risk Reversal" or Synthetic Long position is where an investor will simultaneously buy and sell, out-of-the-money options with the goal of simulating a long stock position.  However, the goal of the synthetic position is to obtain much higher leverage, and reduce the down side risk.  After hearing the folks at fast money talk endlessly about this position, I decided to create a document so people can study it and think Quantitatively about it.  The full article is at: 

http://www.quantprinciple.com/invest/index.php/docs/quant_strategies/riskreversal/

Here is the Abstract:

Abstract
This article discusses a form of Financial Derivative investment strategy called a ‘Risk Reversal.’ A ‘Risk Reversal’ is also referred to as a ‘Synthetic Long’ in some literature. The article explains the theory, and shows you what risks you are exposed to. It also shows you how to protect your investment once the market has moved in a favorable direction. The theory, the mathematics and a theoretical example are presented. If you would like to contact the author, send a message to q.boiler@QuantP rinciple.com  . If there are any errors, typos, or defects with this article please make the effort to contact the author.


Once you have read the article please discuss below (good or bad!).
  

Wednesday, November 18, 2009

How to Nohup an already running unix process

Starting a job at a Unix Command prompt will cause that job to be attached to the shell that started the job. If that shell is terminated, the job(s) that were started under it will be terminated as well. This is caused by the fact that when a UNIX process ends all the processes contained within that processes' process tree are also terminated.

If you have ever had the need to nohup a unix job that was already running, then I have the website for you. http://www.quantprinciple.com/invest/index.php/docs/tipsandtricks/unix/jobcontrol/ This website shows how to disown, nohup, suspend and resume jobs in UNIX.

Nohup stands for no hang-up. When a process is started in the nohup mode, then when the parent shell or process dies, the child process will not die. Disown is a built in bash command that allows you to nohup jobs that are already running.

Keep in mind that jobs and processes are to different things. Jobs are tasks or processes that are tied to a shell. Whereas processes are operating system notions. The above mentioned website gives a very clear description of job control in UNIX.

If you are impatient, and just want a command that will most likely do what you want:
prompt% disown -ar

If you are pretty comfortable with UNIX and UNIX job control, then
prompt% man bash
and search for disown

If you need a bit of help understanding jobs, processes, and job control then
http://www.quantprinciple.com/invest/index.php/docs/tipsandtricks/unix/jobcontrol/

BTW
I BECAME AN UNCLE TODAY!

Wednesday, November 11, 2009

Chicago Quant Meetup Group Started

The Chicago area now has a Quant Meetup group.
http://www.meetup.com/ChicagoQuants

This group will meet to study and understand Quantitative topics in financial engineering. Typically this group will be working through a chapter each month from a well known book in quantitative finance. However, this group is by no means an academic only group. Some of the group members will form organizations to try out the strategies studied in the real world (By actually pooling capital together and forming an investment club or joint venture). Topics that will be discussed: Volatility, Delta Neutral Hedging, Leverage, Risk Arbitrage, Statistical Arbitrage, Strangles, Straddles, Barrier Options, and other strategies.

ALL levels of quantitative financial engineer or investor wishing to understand will be welcome.

ALL members should be willing to chip in a few bucks each month to help defer the cost of a meeting place, and printing of some handouts, plus coffee.

ALL Members are expected to do some reading and preparation before each meeting.

There is NO NEED to have a Ph.D. some knowledge of Calculus is helpful, but almost all of the concepts can be picked up and understood with just an inquisitive mind. That said, Ph.D.s are more than welcome.


About the meetings, we will meet 1 or 2 times per month depending on needs. The meeting will be about 2 hours long, 50 minutes of a presentation, followed by open discussion/questions, and finally a social period over some coffee.

Thursday, November 05, 2009

Unix Script To Suspend Resume a Process

Have you ever wanted to programmatically suspend and resume a Unix process. Possibly setting up to do this in a periodic fashion for N cycles. This can be done easily using Unix signals such as SIGSTOP, and SIGCONT. The SIGSTOP will cause a process to suspend but not stop, and the SIGCONT will cause the process to resume.

So the trick is to determine the PID for the process you want to suspend or resume, and then set up the parameters governing the amount of time you want the process to sleep and run. Additionally, you may want to control the termination of he underlying process based on a number of cycles, time, or some other criteria. Well I have found an excellent script to do just that:

A brief discussion can be found at Discussion.
Of Course, for the impatient a The Script.

Dark Pools in Equity Markets

I had written up a discussion of Dark Pools in equity markets at QuantPrinciple.com see Dark Pools. I am entering the main text here.

Dark Pools in the Equity Markets

What are dark pools? Dark pools are large blocks of equities traded off the exchange floor. In order to understand dark pools, and how they arose, we first must look at why they would even arise in the first place. As Mutual Funds, Hedge Funds, Pension Funds, Insurance Funds and other large blocks of equity increased in size, it became much more challenging for these entities to move their money in and out of a stock. Funds started to look at strategies for how to move money into and out of stocks. These strategies would get quite complex, and would have Quants (typically Ph.D.s in Mathematics or Quantitative Finance) develop them. The strategies were typically assembled by a team of quants, and carried out by a team of traders. However, as soon as a fund's "hat was tipped" other traders would start to take advantage of that knowledge, thus moving the price of the underlying in a disadvantageous direction. Therefore, the Quants would develop strategies that were unpredictable. These could include buying or selling options or other derivative type contracts to allow for protection as the funds tried to move large amounts of equity in or out of an underlying stock.

This worked well while trading was done mostly on the floor. Times changed. Trading moved to electronic systems which are far more analytical and far more sophisticated. Possibly the most significant aspect of the electronic trading and clearing is that the time scales decreased. An equity's price can move much more rapidly today than it could in an open call system. Digital computers are far less forgiving than market makers standing on the floor of the stock exchange.

All these factors lead to the natural desire for a third party to find a more efficient way to move large blocks of equities, without forcing the price up or down in the process. Dark pools allow funds to quietly trade large blocks of stock in the same manner that smaller players can trade. This is really very important for the liquidity of the market because the large player and the small players are really two different equity pools. Therefore, making the large funds play in the small pool of equity would mean that every move they make drives the price in that direction.

Consolidated Tape

Dark pools are recorded to the national consolidated tape. However, they are recorded as over-the-counter transactions. Therefore detailed information about the volumes and types of transactions is left to the crossing network to report to clients if they desire and are contractually obligated.

Dark Pool transactions are recorded on the exchange's consolidated tape. The SEC, and anyone else that wants to purchase the consolidated tape, has some limited visibility into those transactions.