Wednesday, October 10, 2012

High Frequency Trading, Providing Liquidity, or HFT

A student was asking me about high frequency trading as he is getting offers to work for such companies in Montreal. I wanted to give him a short briefing on the financial aspect of it and the IT aspect (as I am mixing both worlds).

I found a very interesting story on /. (slashdot.org) that simplifies the concept in very concise manner.

It is and this is the basis of high frequency trading... though on Wallstreet they call it "providing liquidity". It works like this:
Alice wants to sell 1000 shares of Acme Corp. She places an sell order for 1000 shares at $25.00 on the exchange, but she also places a minimum bid of $23.90 on the sell order. This minimum bid what Alice is willing to accept should someone counter-offer but is suppose to be secret, only the sell price will be published.
Bob is looking for 1000 shares of Acme Corp. He wants to place it in his portfolio for long-term growth, but he thinks it is currently worth less. Bob places a general buy order at $24.40 on the exchange. For the sake of simplicity we will say that is his only price, though he too could have a maximum bid he is will to pay.
So there is a sell order at $25.00 and a buy order at $24.40 pending on the exchange, nothing trades. Now Bob could make a buy offer to Alice at $24.40 and the trade would go thru, or Alice could make a sell offer to Bob at a lower price and follow thru. In a perfect world the exchange would figure it out and match the orders... but that doesn't happen without further action on the part of Alice or Bob.
Eve is a high frequency trader... Actually, Eve is a high frequency trading program at MegaTraders LLC. and has spotted that there are buy and sell orders for Acme Corp on the exchange. Eve places a bid at $24.99 for Alice's share, the exchange accepts, and then Eve immediately cancels the bid order. Eve has just learned that Alice is will to sell for less than the sell order posted. Eve then continues placing bids on Alice's stock, $24.98, $24.97, $24.96, etc., each time immediately canceling the buy when the exchange accepts the bid. Eve gets down to $23.89, at which point the exchange does not accept the bid for Alice's stock. Eve has just learned that Alice is willing to sell for as little as $23.90 and all of this has happened within 10s of milliseconds.
Remember all those articles on Slashdot about high frequency firm X laying their own fiber directly to the exchange to cut milliseconds off transit time? Having custom L2 firmware on their switches and no firewalls on their trading links to cut milliseconds off transit time? This is why they do it, so they can submit hundreds/thousands of buy/sell/cancel orders on a single stock within a fraction of a second to learn pricing differences between orders that otherwise should be secret.
So Eve now knows that Alice is will to sell for $23.90 and would perform the same procedure against Bob to discover his highest buy price. Once found Eve can now see a price difference advantages to herself. Eve buys the 1000 shares from Alice at $23.90 and then immediately sells the shares to Bob at $24.40, pocketing the $500 difference. On Wallstreet they call this "providing liquidity", anywhere else this would be considered insider trading and illegal. Multiple all this by several hundred firms with special inside access to the market place, each running their own competing Eve programs, and you quickly realize how the market can go into turmoil within seconds....

You will find more interesting stories about HFT online.It seems robots are already playing with our money. Nora Young (http://www.cbc.ca/spark/) was speaking last week about robots helping humans. It seems, there is a need now to explore the options of looking at how robots can beat humans. Yes computers are dummy machines that execute what they are told to do. However, computers can accumulate knowledge and use it much faster than humans. This is the horror part of it.

Saturday, September 15, 2012

Islamic Finance @ FMA 2012 in Atlanta


Session 058
Islamic Finance
Thursday, 11:30 am - 1:00 pm
Islamic finance is growing at 15 percent annually and will exceed 2 trillion in 2012. Flush capital in the Muslim world attracts and induces many money managers and financial institutions, whether they are from the Arab or western world, to offer Shariah-compliant assets that fit these Muslim religious preferences. Islamic finance is one of the fastest growing and most innovative financial disciplines in the international financial market, as well as one of the least understood by both the western and Islamic financial communities.
Moderator:
Kabir Hassan, Professor of Finance, University of New Orleans

Panelists:
Zamir Iqbal, Lead Investment Officer, The World Bank
Jahangir Sultan, Professor of Finance, Bentley University
Walayet Khan, Professor of Finance, University of Evansville
Taha Abdul-Basser, Harvard Islamic Finance Program, Harvard University
Luqman Zakariyah, Lecturer, Al-Maktoum College of Higher Education

Friday, July 06, 2012

AUB President: A Message on Honorary degrees

Although I do not agree myself with the selection of one of the honored guests for this year. AUB has been extremely cautious when it comes to relations with Israel over the years. We should thank AUB to sustain a decent position (vis-a-vis the Palestinian cause) at the time where a lot of Arab and Muslim countries are runing toward Israel.

If AUB was dealing differently with the Palestinian cause, it would surely get much more funding from the States.

-----

Dear Members of the AUB Community,

I would like to share with you a personal note, in view of several e-mails that have been circulating among the faculty and on the alumni listserv in the wake of the controversy surrounding the recent honorary degree ceremony at Commencement. In particular, I want to address the comments relating to this administration's purported agenda related to Israel.

The first and paramount observation is that AUB has always respected and complied with the laws of Lebanon, and always will, particularly the laws prohibiting the normalization of any kind of relations with Israel.

Indeed, this position has come at a cost to some of our faculty members in recent years, particularly those who have had to give up significant funding or research partnerships because of the involvement of third-party partners who had ties to Israeli institutions.

Second, this administration at AUB has no normalization or Zionist agenda of any kind. Those who make that claim or imply it are simply wrong on the facts. But raising questions about AUB's presumed Zionist leanings is a sensational charge that catches the eye, can spread quickly, and understandably raises deep alarm among Lebanese and others who have suffered from Israeli depredations.

The circulating messages entitled "Can AUB Find Only Those Complicit with Zionism to Honor?"--taken straight from the extremist coverage published by al-Akhbar newspaper‹is a rhetorical question that belies our history of honoring distinguished Arabs or friends of the Arab world such as Edward Said, Helen Thomas, and Hanan Ashrawi. In the last three years alone, the University has honored Walid Khalidi, Dourade Al Lahham, Eric Rouleau, Mary Robinson, Marcel Khalife, Owen Gingerich, Mostafa El-Sayed, Anthony Shadid, Wadad Kadi, and Munib Masri. Eight of these honorees were nominated by our own faculty.

Some have criticized the administration for awarding an honorary degree to individuals who do not adhere to the Palestine Academic and Cultural Boycott of Israel campaign, an initiative intended to isolate Israel from such contacts. I defend the right of those who take such a position; it is a principled stance, and one that many feel passionate about. Yet institutional decisions cannot be subordinated to an absolute litmus test imposed by the demands of outside groups. Otherwise, to pick just one example, AUB could never have decided to honor Edward Said, who initiated an acclaimed cultural dialogue through his highly visible sponsorship of a Palestinian-Israeli youth orchestra.

I was born in Lebanon in the same year as the nakba; like so many of you, I have never lived in the world without the dreadful specter of Palestinian dispossession and an expanding Israeli settlement agenda, which are deeply immoral and ultimately, in my view, self-destructive.

As for AUB, our campus is a precious and protected space where differences of opinion do‹and must‹exist in a context of mutual respect.

Free speech is fundamentally a core value of AUB and a part of our long tradition of academic freedom. We will continue to honor it, for every voice in our community.

The Provost and I will be meeting this coming week with a delegation of faculty members, who wish to present their petition of disagreement. The Board of Trustees has also asked me to review the process of vetting candidates for honorary degrees. I know the faculty delegation speak for a good number of you reading this message; but I can assure you that we jointly have only the reputation and good name of our beloved institution at heart, alongside a profound commitment to AUB's proud legacy, our home country, Lebanon, and the region we serve.

Peter Dorman
President

Monday, May 28, 2012

Islamic Finance in Canada (or Islamic Mortgages)

A lot of Muslims on the Turtle Island are looking for alternative financing options to acquire their dream houses. A lot of COOP are offering this service in Montreal, Toronto and others. COOP are covering some of the demand and they are doing welll so far. However, the COOP model has its own disadvantages also:
  1. High down-payment (25% -30%)
  2. Short amortization period (up to 15 years)
  3. High rent (7.5% fixed for 15 years). This one looks high but it is about 1.5% above the banks rate in most cases 
  4. Low financing capacity. COOP finance small houses up to $250,000 or $300,000 in most cases out of which the tenant will be paying about 30% 
  5. Long waiting queue. This is natural because one ouf ot every 5 customers can buy a house at a time. So this means, for every bought house, there are 4 other people waiting in line. Hence, 80% of all COOP members would be waiting in line for the repayment of the 20% who already bought houses. Without external finances, the COOP model can not survive.
  6. Rigid regulations and low customer service
  7. Low customer satisfaction 
  8. Low growth potential. 
  9. Low attractiveness for investors. Few people are willing to invest for long term at the rate of 5% under the current scheme. A lot of work is needed on the trust and credibility side. 
However, this option is much better than the TRUST Camouflage model. A lot of companies (or mortgage brokers) are playing on this option to offer a halal service (knowing that it is nothing of halal). Under this scheme, the service provider would clients the following:

  1. The client-tenant Establish a trust and grant the broker to be a co-trustee
  2. The broker will get a mortgage deal form a bank for the client
  3. The client sign the mortgage with the bank (And you say it is Sharia compliant !!!)
  4. The client pays rent to the TRUST (himself/herself and the broker)
  5. The TRUST will pay this rent as interest to the bank (Awful scenario indeed)
  6. The TRUST would charge the trustee to pay a fees (someone paying his own trustee)
  7. The TRUST would charge the client for the contract !
One can see directly that this is not really a viable financing opiton and it is not sharia compliant at all. There are serveal companies offering this financial service in Canada: Ijara Canada, Ijara Mortgage Broker, My Ijara Canada ...

In fact, those companies are trying to offer a good service (from their point of view). However, it is not really sharia compliant and it does not offer a good alternative for Islamic mortgage for Canadians. I am afraid that they know the invalidity of this option and still going for it. This would a major mistake towards the Muslim community in Canada as a whole. 

Sunday, February 05, 2012

CUFON for Arabic Text: @font-face as a solution

I have seen a lot of people asking how to use CUFON with Arabic fonts and texts. This library is amazing indeed especially that it comes at an early stage when a lot of browsers did not know more than 7-10 generic fonts that people are bored with.

Arabic developers (or right to left developers) were not able to use this library because it does not support complex scripts. There is no intention for further development to cover this language as well as mentioned several times by the lead developer of CUFON.

What is the solution then for an arab developer or designer who would like to give a special touch for his websites? The solution is very easy and handy. @font-face !!! Some fancy examples are found on this page (http://hacks.mozilla.org/2009/06/beautiful-fonts-with-font-face/).

How to use it with Arabic text? The solution is very simple:
@font-face {
  font-family:a-remote-font-name;
  src: source url;
  [font-weight:XXpx];
  [font-style:regular html style];
}
The major task is to select a nice TTF (or even OTF) font that you like and link it to the new font-family that you define (Some fonts needs to be converted to EOT though)

Example: http://www.gideas-demo.info/font-face/font-face.html

The html code for this example:
<html>
<head>
<title>كيفية استخدام font-face مع اللغة العربية على الانترنت</title>
<link href="./font-face.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="font-face-arabic-text-title">بسم الله الرحمن الرحيم</div>
 

الحمد لله الذي انعم على الإنسان بنعمة العقل والإبتكار وحب البحث والتعلم. كنا عالماً او متعلماً او محباً للعلم ولا تكن الرابعة فتهلك.
<br/><br/>

 
<div id="font-face-arabic-text-body">هذه تجربة بسيطة وتعريف بكيفية استخدام خاصية font-face مع النص العربي لإضفاء جمالية خاصة على الصفحات المصممة للانترنت باللغة العربية.</div>

</body>
</html>

The css code for this example:

@font-face {
    font-family: "Gideas Font-face Demo";
    font-weight: normal;
    src: local("âک؛"), url("fonts/thickTitleFont.ttf") format("truetype");
}

#font-face-arabic-text-title
{
margin:auto;
width:400px;
font: 150% 'Gideas Font-face Demo','Simplified Arabic';
color:blue;
font-size:40px;
direction:rtl;
}

#font-face-arabic-text-body
{
margin:auto;
width:600px;
font: 120% 'Gideas Font-face Demo','Simplified Arabic';
color:red;
font-size:20px;
direction:rtl;
}



Monday, January 09, 2012

"Price of Sex" by Chakarova: A slam on the face of humanity in the 21st century

First, I have noticed the title on my twitter time line as the movie will be screened by the Us Embassy in Ottawa. First of all, I want to disregard this line because I thought it is just some scam.

After giving it a second thought, I was wondering why the US embassy will be screening such a movie?
Then I have decided to see its trailer and read about this documentary.

In simple words, it is a shame on humanity that human trafficking is six times larger than the slavery trafficking across the Atlantic in the dark ages.

Following their stories from their virgin home to their prostitution residency was awful. People are so dump and have very tough hearts. Why? All for the money. This is the dirtiest money that can be ever collected. The woman is always the weaker link. They wanted her to abuse her further. This industry is huge and much larger than everything you can think of.


The Price of Sex is a rare glimpse into the lives of sex-trade workers and human-trafficking from Europe to the Middle-East. The film unmasks the dangers and corruption involved in the sex-trade industry, as well as the fear, shame and anguish felt by millions women who are forced to sell their bodies for sex.

Friday, January 06, 2012

What is your experience with Magento Open Source e-commerce?

Someone posted this question on Linkedin
Is it suitable for large corporation to build multiple websites? And what are the pro's and the con's? Think of cost, application services, development, etc.

Here is my answer for that:
There are several versions of Magento. Magento Community, Magento Enterprise and Magento Go.

Cost wise, the community edition is the best but you lack the support. For a corporation, the Enterprise edition is the best with $1,000/month for a good support.

What differentiates Magento is its interoperability with various back office systems (natively or via other bridging tools). In addition, Magento is getting the defacto for corporate e-commerce as it scales up well (with extra cost for scalable license) and it is search engine friendly.

Other pros are related to development cost and graphical layout. It is one of the best within the upper end e-commerce packages.

Some of the Con's is the limited access to licensed developers (which is being solved right now by the new certificate system). The classes are free for a while during the beta stage.

Another risk arise from the fact that Magento depends on other tools for the connection with back-office inventory (SAP for example). There are various tools to connect but most of them are being developed out of the Magento Eco-System hence their maintenance is an issue.