#NEWLINE# def update( selected = None ) : #NEWLINE# #INDENT# ( t1 , t2 ) = ( ticker1 . value , ticker2 . value ) #NEWLINE# data = get_data ( t1 , t2 ) #NEWLINE# source . data = source . from_df ( data [ [ 't1' , 't2' , 't1_returns' , 't2_returns' ] ] ) #NEWLINE# update_stats ( data , t1 , selected ) #NEWLINE# corr . title = ( '%s returns vs. %s returns' % ( t1 , t2 ) ) #NEWLINE# ( ts1 . title , ts2 . title ) = ( t1 , t2 )