MARKETABLE SECURITIES
12 Months Ended
Dec. 31, 2021
Investments, Debt and Equity Securities [Abstract]  
MARKETABLE SECURITIES
NOTE 4:-      MARKETABLE SECURITIES
 
As of December 31, 2021 and 2020, the Company held marketable debt securities classified as available-for-sale securities as follows:
 
   
December 31,
 
   
2021
   
2020
 
 
 
Amortized cost
   
Gross unrealized gains
   
Gross unrealized losses
   
Fair
value
   
Amortized cost
   
Gross unrealized gains
   
Gross unrealized losses
   
Fair
value
 
LESS THAN A YEAR
       
                                                 
Government and corporate debentures - fixed interest rate
 
$
196,408    
$
583    
$
(49
)
 
$
196,942    
$
244,434    
$
526    
$
(48
)
 
$
244,912  
Government-sponsored enterprises
    2,501       1       -       2,502       10,006       32       -       10,038  
Government and corporate debentures - floating interest rate
    10,008       10       -       10,018       34,967       10       -       34,977  
                                                                 
   
$
208,917    
$
594    
$
(49
)
 
$
209,462    
$
289,407    
$
568    
$
(48
)
 
$
289,927  

 

 
   
December 31,
 
   
2021
   
2020
 
MORE THAN 1 YEAR THROUGH FIVE YEARS
 
Amortized cost
   
Gross unrealized gains
   
Gross unrealized losses
   
Fair
value
   
Amortized cost
   
Gross unrealized gains
   
Gross unrealized losses
   
Fair
value
 
       
                                                 
Government and corporate debentures - fixed interest rate
 
$
303,429    
$
239    
$
(1,636
)
 
$
302,032    
$
494,520    
$
3,821    
$
(143
)
 
$
498,198  
Government-sponsored enterprises
    16,460       -       (79
)
    16,381       21,264       67       -       21,331  
Government and corporate debentures - floating interest rate
    3,049       1       (3
)
    3,047       17,331       24       (7
)
    17,348  
                                                                 
   
$
322,938    
$
240    
$
(1,718
)
 
$
321,460    
$
533,115    
$
3,912    
$
(150
)
 
$
536,877  
 
The gross unrealized losses on the Company's marketable debt securities were not material as of December 31, 2021 and 2020.
 
As of December 31, 2021, and 2020, interest receivable amounted to $2,635 and $4,376, respectively, and is included within marketable securities in the consolidated balance sheets.
 
Effective June 2021, an equity investment in a privately held company no longer qualifies for the use of the measurement alternative, as the fair value of the investment became readily determinable. The investment was therefore transferred from measurement alternative to equity securities with readily determinable fair value. For more details see Note 2.k.
 
As of December 31, 2021, marketable equity securities with readily determinable fair values, carried at fair value, amounted to $312,934. Unrealized gains recognized during the year ended December 31, 2021 were $249,561.