Energy Trading code