Your being retained is going to be based on at least four variables:
1. **Your performance.** This is pretty self-explanatory. You add value you will likely keep your job all things being equal.
2. **Pipeline.** If your company is a one-trick pony you will be out of a job no matter how well you do. Hopefully yours is not the only project they have going.
3. **Business strategy.** If your company plans to be bought out you have less job security than one that plans to stick around. You may be able to get a feeling for this by looking at how competent your sales force is.
4. **Cashflow.** You want [(Investment Capital Available in $$) / (Burn Rate in $$ per year)] to be larger than the duration of your project. How much larger depends on your risk tolerance.
Unfortunately, if you aren't a founder/partner in the organization you can only exert control over the first item on the list.