def load_stock_prices(self):
from pricedb import SecuritySymbol<EOL>info = StocksInfo(self.config)<EOL>for item in self.model.stocks:<EOL><INDENT>symbol = SecuritySymbol("<STR_LIT>", "<STR_LIT>")<EOL>symbol.parse(item.symbol)<EOL>price: PriceModel = info.load_latest_price(symbol)<EOL>if not price:<EOL><INDENT>price = PriceModel()<EOL>price.currency = self.config.get(ConfigKeys.default_currency)<EOL>price.value = Decimal(<NUM_LIT:1>)<EOL><DEDENT>item.price = price.value<EOL>if isinstance(item, Stock):<EOL><INDENT>item.currency = price.currency<EOL><DEDENT><DEDENT>info.close_databases()<EOL>
Load latest prices for securities