Sunday, November 21, 2010

Commandments for Futures Trading

Futures trading is not easy. There are pitfalls (read risks and consequent losses) along the way. Being a swing trader may seem an easy job of seeing the charts for only a couple of times a day, but practising it exposes you to many excruciating details. I have committed follies, i have seen people make some pretty silly ones too in only a short period of time. Once you have a position, its easy to see the stock go up or down. Not many mistakes you can make there, can you? But initiating a new position or getting out of one seems to be harder for me now. The mind is inconsistent and the ideas are like mayflies. Discipline is a way out. I make sure, I follow my set of commandments before jumping in. Below is an inexhaustive list,



  • Don't book profits midway only to buy again photo_11503_20100114.jpg

    When running profits, run till there is an indication of the trend ending or if your target is achieved. Booking profits halfway will only mean, you spend more on brokerage, if the trend has not ended or end seen. Very important when exposure is just an lot.

  • Never take a position at the start of the day.

    Trading too early in a day only means that trade is undertaken with an incomplete image of the day. There always will be a short pullback until the trend of the day is established. This gives you a better picture. Jumping in early is pre-mature.

  • Initiate new position preferably during the latter part of the day

    There are several advantages to this approach. First, the market sentiment is only evident towards the end of the day. Especially, during days when markets are looking for global ques, trading after Europe opens will provide a better perspective. For a trend based trader closing price gives further clues to the trend. Deferring buying/selling towards the close gives a clearer picture.

  • Futures trading is not for intraday

    The risk/reward ratio doesn't justify doing this, since the brokerage is quite high.

Monday, July 6, 2009

Update on Blueboard

For all its worth, Blueboard from NGX Technologies seems to be gaining traction. Sales has picked up with orders coming in from academics, professional organizations and hobbyists. With a lot of pleasantly unexpected exposure showing up, see through some of the links below,

Do keep visiting Google Code where most of the current development is happening.

Adois for now, will keep you updated with all the excitement ahead.

Wednesday, April 22, 2009

Blueboard - Open Source Hardware

Next-door embedded start-up firm, NGX Technologies is all set to step into a new market transition aka Open Source Hardware. To quote wiki,

Open source hardware refers to computer and electronic hardware that is designed in the same fashion as free and open source software (FOSS). Open source hardware is part of the open source culture that takes the open source ideas to fields other than software.

The term has primarily been used to reflect the free release of information about the hardware design, such as schematics, bill of materials and PCB layout data, often with the use of FOSS to drive the hardware.

NGX name their initiative as Blueboard (ah..well, the naming process was quite democratic and veto-driven by the creators at the sametime :)). However, on the technical side, the Blueboard satisfies all the key aspects needed for the project to be termed as “open”. Everything related to the project is expected to be shared with the open community. Schematics, gerber files, drivers, RTOS, sample applications and all the necessary geek-food will be made available through google code.

Embedded systems design and programming requires a different mental framework to learn. What makes learning embedded systems difficult is the amount of detail that one needs to grasp. While building a typical desktop based C program would require you to know few things like a compiler and editor, a typical embedded engineer goes through a long ramping up process from hardware to software. The details are numerous, interfaces many, failure points umpteen. This idea has been the main driver behind the Blueboard. Having taken a hiatus from embedded for sometime, I was surprised at the way the board and the paraphernalia assisted me in developing something worthwhile. There are few more things to ponder over before Blueboard makes a splash on the embedded development community.

Will keep you posted!!

UPDATE:
You can drop in a quick email of interest at sales@ngxtechnologies.com and let the guys get back to you.
Reblog this post [with Zemanta]

Thursday, March 5, 2009

Layoff blues

Like a leaching dementor, the layoff gloom is here, enervating every cubicle in its path. My workplace too hasn't been immune to the draining effects of the recession. But i am amazed how good can internet be at times like these. Below are some links to keep one informed about the ever spreading recession and its fallouts. If your management can't provide you with a clear picture sites like these help.

For an almost-live status of the layoffs, the following sites help. I visited the sites with some sadistic enthusiasm when my cubicle was under siege. Have a look here and here.

An article worth reading in these times: How to save your job from layoffs, (should have read it a few months earlier though).
Reblog this post [with Zemanta]

Sunday, January 25, 2009

Slumdog Millionaire - The Indian pysche gets offended



Slum dog millionaire has been globally extolled for its worth. In India, there have been mixed reactions. While we are beaming in all the attention Dan Boyle’s movie is providing, there have been accusations about the country being shown in bad light.

On one end of creative liberty, we accept Karan Johar making 3 hour movies where Gucci clad Amitabh dances with blonds and redheads. One can understand that Karan Johar is trying to woo the dollar bucks, but why isn’t he criticized for portraying India to be lavish when it clearly isn’t so. Creating positive vibes is good, but showing the not-so-lavish shouldn’t exactly be, offending? Well, may be the feel good emotions of such creations do help, however vicarious it might seem.

I am not trying to defend Slumdog behind the veil of reality, but simply as a product belonging to another end of creative expression. When compared to a run of the mill Bollywood money grosser, it clearly uses creative liberty in not portraying the affluent but rather celebrating the miserable and unfortunates (other end of the spectrum). I can’t help, but draw parallels with Gregory Roberts’ saga, Shantaram. So why is the movie offending to the Indian psyche? Is it because of the abused and homeless urchins? Is it for not-so-fair dusky toned heroine? Is it for the gaping religious and economic divide?

Let me guess.

I would like to call it a dichotomy. On one side of it, we always look at the brighter and greatly accentuated affluent (read Karan Johar movies), while on the other side we work to suppress the gloomy and miserable. It is like having an ugly-cyclops-like kid in your house you are afraid to let out of basement. Movies like Slum dog have been made by Indians too. Madhur Bhandarkar for instance. The only way to judge such movies is to treat them as pure creations just as we would openly do so to any other Bollywood movie.

Wednesday, January 14, 2009

Using MS Word for your resume? Hmmm..

Microsoft software on the desktop happens to throw up surprises every second week. Some are pleasant ones that that improve your productivity and leave you thanking Microsoft for the genius product. Some, as you might has guessed it, are not so pleasant and leave you clueless, angry and frustrated.

If one has been in the workplace for too long, (as i found out lately) one cannot get all the resume items in one go. So you write down your first project details, then think about what did you fiddle with and then update your resume. After 4 years of dabbling around i had a lot of ego-enhancing resume items to show-off. It took me around 2 weeks to finally get my resume into some shape. As you see, I ending up having a lot of resume modifications and my word based resume blotted to 200KB+. Impervious to the memory efficiency of Word, I also modified my resume summary to fit the job descriptions, every time I applied. A usual practice followed by the sensible job seekers to avoid one's resume being unknowingly modified by the ever eager consultancies.

So what did MS Word do?

It recorded all the changes that had gone into my resume from the time the document was created. No wonder the document a reflected 200KB size. With this heavy resume of mine, I applied to a job that I considered to be a 100% match for my skills. But, I got a blunt rejection from a company who were armed with a fake resume tracking tool that read back all the previous MS Word resume versions. Thanks to the recording function of MS Word, the company considered my resume to be a falsely modified resume just to suit their requirements. Nice tool and an even better MS Word.

Wonder why Word keeps all the records even if Undo function doesn't work after you save and close a Word document? I wasn't even aware of the fact that Microsoft keeps a track of all the changes that you ever make to a word document.

But a nice work around exists for such unpleasant behaviors. Copy your entire resume and paste it into a new word document you are about to apply with. When i did this, my resume size scaled down to 74KB from 200KB.

Hope this post helps some honest soul.
Reblog this post [with Zemanta]

Concurrency Screw-ups

The above code will work perfectly, except when more than one task try to access the same port register. Since the port setting statement is not atomic, the 3 assembly steps could be pre-empted at anytime. Consider tasks A and B, both accessing PortA bits 0 and 1 respectively.

Task A code
1A. mov R0,PortA ; get PortA contents into R0
2A. OR R0,0x0001 ; Or the contents of R0 with bitmap
3A. mov PortA,R0 ; restore the modified PortA from R0

Task B code
1B. mov R0,PortA ; get PortA contents into R0
2B. OR R0,0x0002 ; Or the contents of R0 with bitmap
3B. mov PortA,R0 ; restore the modified PortA from R0

Lets say, Task A intends to set bit 0 of PortA, when after step 2A, gets pre-empted by Task B. Since Task B has no way to know that there exists another task accessing a shared resource as itself, it takes the snapshot of PortA register available to it and goes ahead with steps 1B to 2B. Once Task A cones around to complete its job of setting with steps 2A and 3A, it posseses an old snapshot of PortA. Task B will be in for a surprise as bit 1 is over-written to 0 by Task B. The result is Port A bit 1, if got set will only be so for few moments. The result can be as graver as your imagination can carry.

The solution
Any solution presented would need to involve a method that controls access to shared resources like ports. Task A could either flag the port register as used so as to tell Task B to be careful, or just force the 3 steps to be atomic. Below are the few easy get-aways:
- Disable interrupts globally and restore them once the steps have been completed.
- If restoring interrupts turnouts to be an overhead for a trivial task as port setting, some micros provide instructions which enforce CPU level atomicity for a given number of instructions.

Certain micros provide an architecture which overcomes this issue at the hardware level. There never is a single Port register that performs the setting as well as resetting functionality. Rather, 2 seperate I/O registers are dedicated for setting and resetting. Concurrency problem is again avoided here by allowing bits to change state only when 1 is written.