Hi, I'm new to Quantconnect and I'm trying to log the daily price of the  top 3 stocks of the QC500 class however I only get the list of all of them. Can you please help to figure out what I'm doing wrong? Thanks in advance

from AlgorithmImports import *
from Selection.QC500UniverseSelectionModel import QC500UniverseSelectionModel


class Test_Sp500(QCAlgorithm):


def Initialize(self):
self.SetStartDate(2020,1,1)
self.SetEndDate(2020,2,1)
self.SetCash(10000)


self.UniverseSettings.Resolution = Resolution.Daily
self.SetUniverseSelection(QC500UniverseSelectionModel())
self.data = {}



def OnData(self, data):


sorted_test = sorted(self.data,key=lambda x:self.data.Price,reverse=True)
self.list_of_symbols = [x.Symbol for x in sorted_test][:3]


self.Log(self.Time)


for sec in self.Securities.Values:
if not data.ContainsKey(sec.Symbol) or not data[sec.Symbol]:
return


self.Log(f'{data[sec.Symbol].Symbol} opened at: {data[sec.Symbol].Open}')


self.Log("---------------------------------")