Once again led by Nvidia, tech stocks were the best performers during a rollercoaster ride of a week that ended with the Nasdaq in record territory.