Showing posts with label Finance. Show all posts
Showing posts with label Finance. Show all posts

Saturday, 8 March 2014

Bonds

A bond is a fixed income security i.e. the return from a bond is known when it is issued. The essential difference between a bond and a stock can be summed up in one phrase : "Debt Vs Equity". That is, bonds represent debt and stocks represent equity ownership. This difference brings us to the first main advantage of bonds : In general, investing in bonds is safer than investing in stocks. The reason for this is because of the priority that debt holders have over share holders. But not all bonds are safe. There are also very risky bonds which are known as junk bonds. If a company goes bankrupt, debt holders are ahead of shareholders in the line to be paid.

Bond Issuance :

Bonds are issued by public authorities, credit institutions, governments and companies in the primary market. The bonds are mostly issued through a process called underwriting. On the other hand, government bonds are mostly issued in an auction. After the issue, the bonds can be traded in the secondary market just like other instruments.

Important Bond terms:

Principal value or Par value or face value :

This is the amount on which the issuer pays the interest. In most of the bonds, this amount has to be paid at the maturity of the bond. In some bonds, the amount which is paid at maturity is different from the principal amount.

Maturity :

This the date on which the bond expires. The issuer of the bond has to pay back the nominal amount to the holder of the bond on this date. Most of the bonds have term upto 10 to 30 years. But there are bonds with terms upto 100 years. And there are bonds with terms upto 1 year.

Coupon :

This is the interest rate that the issuer of the bond pays to the holder of the bond. Usually it is fixed, but it can also be variable.

Yield:

Yield is the rate of interest received from investing in the bond. It is one of the most important factors that investors care about while investing in bonds. We would talk more about it later.

Credit Rating:

This is the rating given by an agency which tells us the probability that the bond issuer would pay back the promised amount at maturity.

Some major types of bonds:

1) Fixed rate bonds : As the name suggests the coupon rate of these bonds is fixed.
2) Floating rate bonds :  The coupon rate of these bonds is not fixed.
3) Zero coupon bonds : These bonds don't pay any coupon.
4) High yield bonds :  These are also known as junk bonds. These bonds are usually start up companies which need capital to expand but don't have good credit rating. So, to lure the investors these companies issue high-yield bonds which have very high coupon rate. But this comes at the cost of risk associated with these bonds.
5) Convertible bonds : These types of bonds allows the owner of a bond to exchange it for some specific number of shares.

Bond Valuation:

Bond valuation refers to valuing the present value of a bond. The fundamental principle of bond valuation is that the bond's value is equal to the present value of its expected (future) cash flows. While valuing bonds, we consider time value of money concepts. Let's see how to calculate the price of a bond. First we need to compute the present value (PV) of the bond's future cash flows.The PV is the amount that would have to be invested today to generate that future cash flow. To find the value or the price of a bond, the PV of each individual cash flow should be added.

PV at time T = (Expected cash flow in period T) /( (1 + I) to the power T)
where I is the discount rate.

Value of bond = PV @ T1 + PV @ T2 +.........+ PV @ Tn

How does the value of a bond change:

As we can see, discount rate is the only variable factor in bond price. Rest everything is fixed.

  • As the rate increases of decreases, the discount rate that is used also changes. Higher the discount rate, the lower the value of a bond; the lower the discount rate, the higher the value of the bond. 
  • If the discount rate is higher than the coupon rate, the PV will be less than par. If the discount rate is lower than the coupon rate, the PV will be higher than par value.
  • As the bond moves closer to its maturity, it's price will closer to par. At par, market price is equal to par value and yield to maturity is equal to the coupon rate. This is clear since the expected rate of return in this case would be equal to the coupon rate. When a bond is selling at a discount, it's market price is less than the par value. So, it's yield to maturity is greater than the coupon rate. On the other hand, if a bond is selling at a premium, it's market price is greater than it's par value. So, it's yield to maturity is less than the coupon rate.
  • If a bond's market prices increases, then it's yield must increase; conversely if a bond's market price decreases, then it's yield must increase.
  • If a bond's yield does not change over it's life, then the size of it's discount or premium will decrease at an increasing rate as it's life gets shorter.

Thursday, 8 August 2013

Implication of Open Interest in Futures Markets

What is Open Interest ?

The bookish definition says that Open Interest is the total number of outstanding contracts that are held by market participants at the end of the day. In other words, Open Interest is the total number of future contracts or option contracts that have not yet been exercised, expired or filled. Open Interest makes sense only for Futures market.

Open Interest measures the flow of money into the futures market and hence is used by traders to confirm trends and trend reversals in futures market. The open interest position that is reported each day represents the increase or decrease in the number of contracts for that day and hence is shown as a positive or negative number.

Open Interest Calculation :

A contract has both a buyer and a seller. The open interest for a day is the increase or decrease in the number of contracts for that day. For example, if 2 parties in a trade are initiating a new position i.e. 1 new buyer and 1 new seller are entering into the market, open interest would increase by one contract. On the other hand, if 2 parties in a trade are closing an existing position, open interest would decrease by one contract. There is one more possibility wherein one old trader passes its position to a new trader. In this case, open interest does not change.

Benefits of monitoring Open Interest :

In short, increasing open interest means that money is flowing into the market. Due to this, the present trend will continue. If the current trend is upward, it would remain upward. If it is downward, it would remain downward. Declining Open Interest means that current market trend is coming to an end. If the price jumps significantly but open interest remains leveled, it is an early warning to the end of bull market and vice-versa. Hence, an increase or decrease in prices while open interest remains same is an early indication of trend reversal.

Further reading:
Investopedia has more details on this.

Sunday, 2 December 2012

Algorithmic Trading - Part 1

Algorithmic Trading is the use of electronic platform for placing trading orders with an algorithm deciding the timing, price and size of orders. High Frequency Trading (HFT) is a special class of algorithmic trading in which trading systems make trading decisions based on the information they receive electronically before human traders are capable of processing the information they observe. 

Who is suited for Algorithmic Trading ?

The most important reason for going for algorithmic trading is to control the market impact while placing big orders and thus seek favorable prices. Anyone who places big orders needs to worry about the market impact. As a thumb rule, if the size of order exceeds the sum of best 5 levels you need to worry about the market impact.  Big institutions like pension fund managers, investment banks, hedge funds, etc. are the ones who place Algo orders.

 Lets see how algorithmic trading minimizes market impact. All the orders placed can be classified either as Market Orders or Limit Orders. Markets orders want the exchange to execute the order in the best possible price. So, if you want to buy, the exchange will find the seller who is willing to sell at the lowest possible price and execute the order. Limit Ordrs on th other hand specify the limit on the negative side. These limit orders are not executed right away and they stay in the book for some time. These live but non executed orders form what is called the order book. Lets say I place a Market Order to buy 1 million Yahoo shares. The exchange will try to find the best seller which is selling at the least price and then the next best and so on, till the I get 1 million shares. This means that the execution price is going to be poor. On the other hand if I place a limit order. Now, the exchange will execute whatever it can but it will stop as soon as there are no more sell side orders with favorable price. Once this is done, your order becomes part of order book.  Once everyone, including other algorithms, sees such a massive order sitting on the buy side, price is bound to rise sharply.

However, algorithmic trading has generally been a sell-side product. This means that institutional brokers are the ones who actually have the systems for placing and managing algorithmic orders. Institutional traders place Algo orders with brokers who submit the orders either programatically from automated systems or manually through user interfaces. Institutional brokers and investors have invested a lot of time and money on Algo trading systems over the years.

Lets look at one of the simplest algorithmic strategies :

TWAP (Time Weighted Average Price) trading strategy :

TWAP breaks a big orders into smaller chucks of orders which are executed after a fixed interval. But a simple algorithm or even a smart trader can figure out this pattern by looking at the order book. So, nearly all production TWAP algorithms involve some type of randomization. This randomization can be done in terms of the sizes of orders or in terms of the intervals between the orders or both. 

The basic rule is to start with an initial order size and keep increasing or decreasing the size of order. The first question that comes to mind is when to increase and when to decrease the size of order. The answer depends on whether the market is in mean reversion mode or is trending towards one direction. If you a buyer and the price continues to drop, then it makes sense to wait for some time as the price is going to be more lucrative. On the other hand, if the market is in mean reversion mode, the trend is not going to last for ever and so we need to increase the size whenever price becomes favorable.

The next question is how to predict the market. Well, truly speaking, nobody can predict the market. We just try to be correct more often than we are wrong. This is where high frequency trading comes into picture which helps us to predict the market by analyzing the market trends quickly.

Saturday, 3 November 2012

The Mystery about Sensex

I really wonder why people in India always talk about Sensex without knowing what it is and what is indicates ? Forget about common people, even news channels and financial newspaper always talk about Sensex. Most of the time if you switch to a news channel, they would be talking about Sensex going up or down and predicting India's economic condition by analyzing the Sensex. Sensex is the most tracked and the most talked about index in India. But what is surprising is that it is also least understood index.

What is Sensex ?

Sensex stands for Sensitive Index which is used for Bombay Stock Exchange (BSE). Sensex which is also popularly known as BSE 30 in the financial world is a free-float market-capitalization of 30 well established companies listed on Bombay Stock Exchange. In other words, Sensex tracks price movements of 30 stocks on BSE. During market hours, prices of the index scrips, at which latest trades are executed, are used by the trading system to calculate Sensex  every 15 seconds and disseminate in real time. Sensex makes sense only for Index Fund managers and I don't understand why common man worries about Sensex. Sensex is just a virtual show window of Bombay Stock Market.

Sensex Calculation :

Foremost question which arises is how are these 30 companies selected ?
The top 30 companies with highest free market capitalization are selected. Free market capitalization considers only the shares which are not locked in or the shares which are available for trading. It excludes the shares which are locked by promoters or other strategic investors which can not be traded.
So,
 Free Market Capitalization = Total shares available for trading X Current Market Price

Its clear from the above formula that free market capitalization is dynamic due to the changing market price.
BSE reviews the list of stocks periodically. This essentially means that some stocks are moved out of the Sensex calculation and some are moved in after every review. The 30 stocks selected by the above process are given some weightage  as per its free market capitalization. The base value of Sensex is 100 as of April 1, 1979. The level of the Sensex at any point of time thus reflects the collective free float value of 30 component stocks, relative to the base period. So, a Sensex level of 30000 indicates that the Capitalization of current top 30 stocks is 300 times the Capitalization of top 30 stocks as of the base year.


Myths about Sensex :

1. Sensex mirrors the performance of all the sectors in the Indian ecomony.

The top 30 companies used in the calculation of Sensex do not have nay sectoral quota. These 30 companies mostly include IT companies and Oil & Natural gas companies. Sectors such aviation, gem processing do not have any representation in the Sensex. Hence Sensex can't indicate the performance of all the sectors in the Indian economy.

2. Sensex is an indicator of India's economic growth.

Often Sensex is taken an indicator of India's economic growth. It should be noted that Sensex tracks only the companies which are listed on Bombay Stock Exchange (BSE). Many Indian companies are not listed on BSE. Hence it foolish to consider Sensex as a true indicator of India's economic growth.

3. Sensex tracks performance of all companies listed on BSE.

Sensex tracks only a small set  of 30 companies with the highest Market Capitalization, but there are around 3600 companies listed on BSE. So, even if Sensex rises, many listed individual stocks may have lost value and this scenario has happened many times. In fact on October 29, 2007, The day Sensex touched 20000, 2123 out of 3113 companies declined in value. 

4. Sensex captures price movement of all these 30 companies.

Again wrong. The 30 companies used in the calculation are not given equal weightage. In fact, top 30 companies used is the calculation of Sensex have more than 65% weightage. Thus the rise and fall of these 10 stocks considerably impact the rise and fall of Sensex than the last 20 stocks.

Conclusion :

Sensex is not an unbiased true indicator of top 30 stocks listed on BSE let alone entire stock market and Indian economy. Retail investors should not look at the Sensex and rush into investing in the stock market. A little known fact about Sensex is that its base year has been changed (it was decreased). So, just by decreasing the base year, you can raise the Sensex and this was exactly the motive behind decreasing the base year. The top 30 companies which are used in the Sensex calculation today, were not even present at the time of the base year. So, whats the purpose of this index. In my opinion this base year should be raised at least to the nineties to make some sense.

Saturday, 27 October 2012

Trading Systems - Part 1

Trading Systems are simply set of rules that traders use to determine their entry and exit from a position. In an ideal condition, traders should be like machines which have no emotions. But this is an ideal case and there is practically no emotionless human being. Now the question is what stops us from building a machine which trades.

What is a Trading System ?

A trading system is just a strategy which you develop to trade. You might need different trading systems for different markets because the strategy you use to trade in one market may not be applicable to another market. A trading system consists of 8 parts :
1. A Market Filter
2. Set up conditions
3. Time Frame
4. Entry signal
5. Protective Stop
6. Re-entry Strategy
7. Exit Strategy
8. A position sizing algorithm

A Market Filter : 

A market filter is a way of looking at your market to determine whether this market is appropriate for your system. We can have bullish markets, we can bearish markets, we can have flat markets etc. Your trading system might work well only in one of these market conditions. As a result you need a filter to determine whether your trading system should trade in such market conditions.

Set Up Conditions :

This is your screening criteria. For example, if you trade stocks, there would be 10000+ stocks available that you might decide to invest in at a time.As a result, trading systems employ a series of screening criteria to bring this number down to around 100 stocks. You might have a component in trading system to watch the stock to go down for 7 consecutive days before entry. 

Time Frame :

The first thing when you are developing a trading system is to decide what kind of trader you are. Are you a day trader or a swing trader ? Do you look at charts everyday, every week, every month or every year. How long do you want to hold on to your positions ? This will help determine which time frame you will use to trade.Though you still will be looking at multiple time frames, this will be the main time frame you will use when looking for a trade signal.

Entry Signal :

It is signal that tell you when you might enter a position - either long or short. Entry signal depends on entry rules. The simplest way to generate an entry signal is to employ moving average cross over system. The dual moving average crossover (DMAC) is a simple entry rule. If you employ this rule, a 'buy' entry signal is generated when the shorter term moving average crosses the shorter term moving average. Many traders seem to despise such simple procedures and prefer to use more sophisticated rules.

Protective Stop : 

This is one of the most important components of a trading system. This defines the worst case loss that you would want to experience. Your stop might be some value that would keep you in the stock for a long time(e.g. a 25% drop in the price of the stock) or something that will get you out quickly if the market turns against you(e.g. a 25% drop). Without having proper protective stop, your trading system can incur heavy losses. 

Re-entry Strategy :

Quite Often when you get stopped out of a position, the stock will turn around in the direction that favors your old position. When this happens you might have a perfect chance for profits that is not covered by your original set-up and entry conditions. As a result, you need to think about re-entry criteria. When might you want to get back into a closed out position ? Under what conditions would this be feasible and what criteria would trigger your re-entry ?

Exit Strategy : 

Just as we have a rule which generates a signal which tells us when to enter a market, there is a rule which generates a signal which tells us when to exit a market. Sometimes you might have to exit from a winning position and sometimes you might have to exit from a loosing position. In fact in most of the profitable trading systems, only 25 - 30 % of the trades are profitable. This is the most critical part of the trading system. You must spend a great deal of time on exit strategies. For exits, you have different options. You can either trail your stop, or have a set target and exit  when the price hits that target.


Position Sizing Algorithm : 

A position sizing algorithm just tell you 'how much' and 'how big' of a position to take. Position Sizing algorithm is a key factor in whether or not you stay in the game, or whether your gains are huge or minimal. In its simplest form, it boils down to : how many shares to trade, when to increase, when to decrease, when to take profits and so on. 

Advantages of Trading System :

Emotionless :  A trading system takes all emotions out of trading which is often cited as one of the biggest flaws in individual traders. 

Save Time : A trading system saves a lot of time which a trader would spend on analysis. A trading system can even directly place trading orders without the intervention of a trader.

Disadvantages of a Trading System : 

If a trading system would be without any disadvantages, it would be like a money making machine. But this is not the case. Lets look at the other side of the coin.

Complexity : Trading systems are very complex. You require solid technical expertise in the development phase as well as afterwards to make any changes in strategies. 

Transaction Costs : These are the costs incurred when do a transaction through a trading system. These are more than commission costs.

Time consuming in the development phase : It takes a lot of time to develop a trading system. You have to come up with strategies and then code your strategies. While coding you would have to come up with very efficient code since the data that you use to trade can be huge and you have to process the data efficiently. Also you are directly dealing with money, so it needs rigorous testing. 

Saturday, 20 October 2012

A View on the Transition from Academia To Finance

The other day I was going through an article by Catherine O'Neil from D.E. Shaw group about her transition from academia to finance which I found very interesting. I am sharing that edited article here. First I would like to introduce Catherine.After earning a degree in mathematics from UC Berkeley in 1994, Catherine went to Harvard as a graduate student where she studied number theory and graduated with a Ph.D. in 1999. Then she went to the Massachusetts Institute of Technology as a Moore instructor and then a second postdoc. She started working for DE Shaw group in June of 2007.
Now on to the answers from Catherine:

Why leave Academia ? Why finance ? Why the D.E. Shaw group ?

I found the time scale of academic life frustrating. What started as a moment of insight would take years to get published and disseminated, and that's if you are lucky.
     Finance is a huge and rapidly growing, sexy new field which combines the newest technology with the invention of mathematics to deal with ever growing abundant data. It is the essence of modernity,
and paired with New York City’s infinite energy, I found it extremely attractive. It was really as
simple as that—I didn’t actually know any finance when I decided to apply.
     I first heard of the D. E. Shaw group when Eric Wepsic, my high school math friend, chose to leave Harvard math graduate school to work at this company way back in 1994. Eric would send me emails every year or so, asking if I knew anyone interested in working there, and one day I wrote back and said, “How about me?” The D. E. Shaw group was particularly appealing because it is known for being a well-run company, and since I had decided to try my hand at business, I wanted to start at a good one. Although some people apply to the D. E. Shaw group because it’s known as being pretty academic, I think this is not an appropriate line of reasoning: get a job here if you want to be in business and not academics.

What is D.E. Shaw group like ?


There are a number of groups here and some of them, including my group, focus on the systematic quantitative investment strategies that made the D. E. Shaw group famous, while others
work on more fundamental strategies. I work as a quantitative analyst in a group consisting of about twenty traders, quants, and programmers. A group can be thought of as being similar to an academic department at a university. Groups differ by the type of financial instrument they trade or the means used to approach the trading of a common instrument. Frequently, groups overlap in the type of instrument traded but each group
has its own way of looking at the market.
     In the world of finance, the D. E. Shaw group is special. For example, we have no dress code. Personally I don’t really care about that, but this flexibility has allowed us to attract a number of really exceptional people for whom this is important. More importantly, we are not expected to work insane hours, which is great for me and my young family. When I say not insane, I should mention I work about 9.5 hours a day, five days a week, which is definitely more time than I spent in my office as an academic.

What do you do there ?


On a daily scale, my time in largest to smallest allotments is spent writing code to test models, writing up projects, talking to my manager, talking to other quants in my group, attending or giving a weekly seminar, learning techniques and thinking of new models, and reading business news. As a quant my job is to understand how financial markets work, which is neither purely mathematical nor purely social but which has elements of both. I might come up with an idea using broad economic themes but it is not a model until it is in a testable form involving concrete data. Also, in my group we rotate the responsibility of maintaining the
automatic computer trading system. This is really just a huge program that decides what and when to trade, and it needs constant attention. So for one week in about thirteen, I am on-call basically all the time. As a recent academic, I find this to be the part of my job that is probably the most alien and intimidating, but it is also extremely satisfying to be involved with the nuts and bolts of the operation.
     The transition from academia to finance has meant a shift in my priorities. Unlike when I was in academics, I no longer have to worry about grants, getting papers published and waiting a long time from beginning to end on my projects.  Now working in finance I do worry about the relevance and testability of my ideas, the minute correctness of my code, and of course profit. Leaving an academic career has meant giving up teaching, the students, and the absolute freedom to work on any project I want. On the other hand, finance has provided me with the opportunity to come up with good, new ideas that will be put into effect, be profitable, and for which I will be directly rewarded.

Would I like your job ?


To that question, I would counter with these:
Are you efficient-minded?
Can you sustain focus?
Are you flexible about the field to which you apply your quantitative talents?
Do you like to understand how systems work as well as the theory behind them?
Do you enjoy mastering new skills?
Do you appreciate the existence of a “bottom line”, a way to quantitatively measure the success of your projects and your ideas?
Are you articulate?
Are you good at following through and finishing projects?

     Notice I didn’t ask if you are particularly informed about finance or money per se, because honestly I wasn’t when I decided to enter finance. I don’t think it was a disadvantage, and now I really enjoy finance and find myself reading finance books instead of fiction. I had also never coded, but now I really enjoy coding. Both of those are skills that anyone with focus, intelligence, and flexibility can master and enjoy. For me and for many of my colleagues it is intrinsically satisfying to be in a collaborative atmosphere as part of
a functional, productive, and hard-working team with clear goals.

What does the D.E. Shaw group look for ?


The D. E. Shaw group hires people of extraordinary ability. Quant candidates typically come from math, physics, or computer science backgrounds and often have Ph.D.s. This is not to say having a Ph. D. is a requirement, but certainly being capable and smart enough to have a Ph.D. is. What we are really looking for is new ideas, and so our target is the creative, careful thinker. We look for evidence of such talents in the forms of published original papers as well as original personal projects or specialized hobbies. We typically do give brainteasers in interviews, but it is not true that only people who are insanely quick at brainteasers are seriously considered. I do not consider myself all that quick, for example, but I am methodical, articulate, and I don’t make huge mistakes.

Is Finance a good place for women ?


Working in finance is different from working in academics in that there is no tenure. However, I would recommend thinking about the concept of employability over job security. Although a given company may not last forever, the finance industry is here to stay, and there is always a need for quantitatively strong people. If you find yourself out of a job, but you have real skills and knowledge, chances are you will find another job quickly.
     Partly because of this consideration, the D. E. Shaw group tries very hard to get great people and keep them. The turnover is low, partly due to our selectiveness in hiring only the very best people, and partly because people feel valued and don’t want to leave. In fact some people have been known to retire early, but soon change their minds and return. There is little burn-out because the hours and conditions are reasonable.

What is corporate culture like ?


It is really different. People are both more competitive and more collaborative. They are more competitive in the sense that there’s lots of money involved, and therefore getting credit for an idea that makes money is a direct channel to getting paid better. At the same time, everyone relies on their colleagues to keep the whole thing running and so it is imperative that we work as a team. It’s an intense, challenging, and exciting environment to work in.
     About the money: many mathematicians who talk to me about moving to finance are genuinely worried about the potentially corruptive power of money. I take that fear very seriously, and I think I probably would have applied to the D. E. Shaw group earlier if I hadn’t experienced it myself.
     Several factors have helped me come to terms with this concern. First, it is really expensive to live in New York, especially with kids. So actually as a new quant, you are not all that rich, even though you are making more than almost all academics. However, it is clear that if you stay in finance for long enough, and are successful, you do become rich. Even so, I do not find my colleagues to be particularly acquisitive, and indeed some of them are known to support progressive causes and charities such as the Robin Hood Foundation, and I’m sure many of them quietly do so as well. In fact it is a stated goal of the D. E. Shaw group to foster an ethical work environment and to do what’s right.
     I think one can resist being corrupted by money by keeping a perspective and maintaining personal boundaries. I personally give a certain amount of my paycheck to my favorite grass-roots charity. I thereby see working here as a fantastic and rare opportunity to have a great job and to improve the world in some small way simultaneously.





Saturday, 6 October 2012

Financial Information Exchange (FIX)

What is FIX ?

FIX was originally called Fidelity Information Exchange, but now FIX stands for Financial Information Exchange. FIX is an industry driven standard to communicate trading information electronically between brokers, buyer institutions, seller institutions and markets. FIX is platform independent, so it works with various types of computers and communication systems. FIX has been developed through the collaboration of banks, institutional investors, brokers and exchanges. These market participants wanted a common language for automated trading of financial instruments.

Brief History

FIX was first developed in 1992 by Robert Bob for equity trading between Fidelity investments and Salomon Brothers. Hence it was first called Fidelity Information Exchange. FIX has now become the de facto messaging standard for pre-trade and trade communications in the global equity market. FIX has now entered post trade space as well as foreign exchange, fixed income and derivative markets. FIX Protocol Ltd. is the company established for the purpose of ownership and maintenance of the specification. FIX is gaining increased attention within the exchange community as over three quarters of all exchanges surveyed supported a FIX interface, with the majority handling over 25% of their total tarding volume via FIX.

FIX Connectivity Diagram

Financial Information eXchange System Connectivity Diagram.svg
source : http://en.wikipedia.org/w/index.php?title=File:Financial_Information_eXchange_System_Connectivity_Diagram.svg&page=1

FIX Messages

FIX session is layered on TCP. FIX messages are formed from a number of fields, each field is a tag value pairing that is separated from the next field by a delimiter ASCII 01. The tag is a string representation of a integer that indicates the meaning of the field. The value is an array of bytes that hold a specific meaning for the particular tag. FIX protocol defines a set of fields that make up a message. Some of these fields are mandatory and some are optional. The ordering of the fields is unimportant. A FIX message is composed of a header, a body and a trailer. Following is an example of FIX message:

Sending: [
 BeginString 'FIX.4.2'
BodyLength '200'
MsgType 'D' "Order - Single"
MsgSeqNum '81'
SenderCompID 'DSCWE10'
SenderSubID 's1'
SendingTime '20100914-13:34:27.643'
TargetCompID 'BCAPSUBM'
PossResend 'N'
Account 'DESHVALI'
ClOrdID 's1bs6940_20100914'
Currency 'USD‘
OrderQty '100'
OrdType '2' "Limit"
Price '129.45'
Side '1' "Buy"
Symbol 'IBM'
TimeInForce '0' "Day"
TransactTime '20100914-13:34:27'
ExDestination 'N'
MaxFloor '100'
SecurityType 'CS' "Common Stock"
CheckSum '161'
]

Recovery Handling : 

FIX has an optimistic model for recovery. It does not has per message acknowledgement. Instead the receiver monitors sequence number and detects gaps. Sequence number increases monotonically and is generally reset per day. There are serious errors is sequence number is decreased.

Sunday, 29 July 2012

Hedge Fund Vs Mutual Fund

I myself had this doubt for quite a long time: What is the difference between a Hedge Fund and a Mutual Fund. This month I started working at D.E. Shaw & Co and during the induction program, I was introduced to the financial concepts. This was different from what I has exposed myself since the last 4 years i.e. algorithms, operating systems, databases, compilers, processors, computation and blablabla.This was a slight shift from my regular track which is computer science, but I really enjoyed a lot. I explored a little more and got a clear understanding of the difference between a Hedge Fund and a Mutual Fund. In this post I would share my findings.

Hedge Fund

A hedge fund is an aggressively managed portfolio that uses leveraging to generate high returns. The word 'hedge' means to minimize or to reduce financial risk. But we see that hedge funds are mostly risky. They are so risky that only big investors invest in hedge funds. They are open to only some specific type of investors specified by regulators. These investors are big institutions such as pension funds and high net worth individuals. The goal of a hedge fund is to maximize returns and do achieve this goal, hedge fund uses leveraging. Now there is a very basic theory in finance which goes as: "Higher the returns, higher the risk involved". Since hedge funds give higher returns, they involve more risk. Then why are they called hedge funds since 'hedging' means to minimize or to reduce risk. Like mutual funds, hedge funds also pool money from investors and then manage them. But hedge funds uses leveraging to maximize gains and that make them risky. Let me explain the concept of hedging by the following example:

Suppose a hedge fund collects 100 $ from investors (I have taken this amount just for illustration. The actual amount that hedge fund invests runs into billions of US dollars). It takes 100 $ from a bank (This is what is leveraging). Now hedge fund has a pool of 200 $ which it invests. Now the bank that lends you 100 $ has a condition: No matter what you gain or loose, I should get 120 $ after say 6 months. Now lets examine 2 cases:
  1. Suppose after 6 months, hedge fund makes a profit of 40%. The value of the portfolio is 280 $. Hedge fund gives 120 $ to the bank and distributes 60 $ as profit among investors. Of course, it charges some fees also, but I have not included it in my computations. Hence the investors make a profit of 60%.  Now we see the power of leveraging. Though hedge made a profit of only 40%, it gave 60% profit to investors. This is possible due to leveraging.
  2. Suppose after 6 months hedge made a loss of 10%. The value of the portfolio is 180 $.  Hedge fund gives 120 $ to the bank and the value left in the portfolio is 60 $. Of course, it charges some fees also, but I have not included it in my computations. Hence the investors made a loss of 40%.  Now we see the risk of leveraging. Though hedge made a loss of only 10%, it resulted in 40% loss to investors. This is reason why hedge funds are risky.

Mutual Funds

A mutual fund is a type of professionally managed collective investment scheme that pools money from several investors to purchase securities. But unlike hedge funds, mutual funds are highly regulated. Mutual fund is open to common man unlike hedge funds. Due to this reason, mutual funds are highly regulated. They can't invest in any security, but only those which are approved by the regulators. Hence mutual funds are safer than hedge funds. Then again that basic finance theory comes into picture: "Lower the risk, lower the returns". Hence mutual funds don't generate as much returns as hedge funds.

Similarity between a mutual fund and a hedge fund

  1. The most important similarity between a hedge fund and a mutual fund is that they both pool money from investors. 
  2. One more similarity is that in a hedge fund also investors can withdraw their money as in a mutual fund

Difference between a Mutual fund and a Hedge Fund

In a nut shell, following are the differences between a Hedge Fund and a Mutual Fund:
  1. Hedge funds focus on absolute returns while mutual funds focus on relative returns.
  2. Hedge funds can invest in any asset class- stocks, bonds, sub prime mortgages, commodities, real estate. While mutual funds can only invest in a set of asset class. Mutual funds have to follow compliance framework set up by the regulator. Hence risky asset classes are debared from  investment.
  3. Hedge funds use leverage. Though mutual funds can also borrow to some extent but they are highly regulated.
  4. Hedge Fund can run concentrated portfolios. In case of Mutual Funds we have to protect investors' money and hence they always use diverse portfolios.
  5. Hedge Funds are meant for richer people to become more rich. Whereas even low worth individuals can invest in a mutual fund.
  6. Hedge Funds are unregulated whereas mutual funds are highly regulated.

Sunday, 22 July 2012

Money Markets

Money

Money is the current medium of exchange. I have seen that often people get confused with money. The money that is in our bank accounts is not real money. Money that is on account of the Central Bank of a country is the Real Money.  All other forms for example, the account balances with the commercial banks, even cash are promises to pay money, but not real money. Like individuals, banks and larger institutions also transact money amongst each other. In these transactions cash is not involved, but real money kept in accounts with the Central Bank of a country is involved.

Money Markets

Money market provides short term finance(for a period less than 1 year). The parties involved in Money Markets are Central Banks, Commercial Banks, FIs, Mutual Funds and Primary Dealers. One of the main differences between money markets and stock markets is that most money market securities trade in very high volume thus limiting accessing individual investors. The easiest way for an individual to access money market is through money market mutual funds. However, some money market instruments like Treasury bills may be purchased directly. Below we will have a look at major money market instruments:

Treasury Bills(T-Bills)

T-Bills are the most liquid money market securities. T-Bills are a way for the US government to raise money from the public. I am refering to the T-Bills issued by the US government, but many governments issue T-Bills in a similar fashion. Treasury Bills are issued through a competitive bidding process. The biggest reason that the T-Bills are so popular is that they one of the few money market instruments that are affordable by individual investors. Another important reason for their popularity is that they are considered to be the safest investment in the world because they are backed by US government. But this safety comes at a cost. They have very low returns. And this is the basic rule in finance: The higher the risk, the higher the return.

Certificate of Deposit

A certificate of deposit is a promissory note issued by a bank. It is a time deposit that restricts holders from withdrawing funds on demand. CDs are similar to saving accounts in that they are insured and hence virtually risk-free. They are different from saving accounts in that CDs have a specific and fixed term(often 1 month, 3 months, 6 months, 1 year). CDs generally give higher rate of return than Bank term deposit.

Commercial Paper

An unsecured, short-term debt instrument issued by a corporation, typically for the financing of accounts receivable, inventories and meeting short-term liabilities. Maturities on commercial paper rarely range any longer than 270 days. Commercial papers are not backed by collateral. Since these are not backed by collateral, only firms with high credit ratings from a recognized rating agency would be able to sell its commercials papers at a reasonable price.

Banker's Acceptance

BA is a promised future payment which is guaranteed by a bank and drawn on a deposit at a bank. A BA specifies the amount of money, date and the person to which the payment is due. Now the holder of the draft can sell it for cash to a buyer who is willing to wait until the matutity date of the funds in the deposit. BAs make the transaction between 2 parties who do not know each other to be more safe because they allow parties to substitute the banks's creditworthiness for that who owes the payment.

Eurodollars

Eurodollars are US dollar denominated deposits at banks outside United States and are thus not under the jurisdiction of Federal Reserve. These are called Eurodollars because most of the initially most of the US dollar reserves outside the United States were in Europe. Eurodollar market is relatively free of regulations and hence banks can operate at lower margins than their counterparts in United States.

Repo

A repurchase(repo) agreement can be seen as a short term swap between cash and securities. If a security holder wants to maintain his long-term position but needs cash for a short term period, he or she can enter into a repo contract whereby the securities are sold together with a binding agreement to repurchase them at a future date.. The effect is to provide the security holder with a short-term loan based on the collateral of the government securities he or she owns.