“Life can be kept in existence only by a constant process of self-sustaining action. The goal of that action, the ultimate value which, to be kept, must gained through its every moment, is the organism's life. .... An organism's life is its standard of value: that which furthers its life is the good, that which threatens it is the evil.”
~ Ayn Rand, "The Objectivist Ethics", The Virtue of Selfishness
Egoism is not a virtue by itself - simply knowing that one should act selfishly provides no guide to action. One must use reason to derive virtues, which are principles that describe rationality in particular realms.