add a method in MainWindow to get the current portfolio and throw a exception is none has been selected.