Gear penalty penalizes all the gear's stats and bonuses. Assuming you meet the optimal rank and it isn't damaged, a factor of 60% applies. However, they round up (Strength+2 will still be +2 for that reason). HQ items get a boost of 5%, 10%, and 15% for +1, +2, and +3. It applies only to the stats that have stars. This formula is applied before the rank penalty above.