We have reported the mechanical properties of topological semimetals half-Heusler compound YPtBi with LDA and GGA approximation which is implemented in density functional theory. We have calculated elastic parameters which ensure good machinability, covalent bonding, brittleness, low value of Kleinman parameter and high Vickers hardness. Our results reveal the hardness or large resistance of these topological semimetals. Moreover, Born mechanical stability conditions are well fulfilled by the topological semimetal YPtBi. Present study reveals that the low value of bulk modulus and shear modulus wheras high value of Youngs modulus of this topological semimetals which deforms easily with applied external force. We have also calculated optical properties of topological semi-metal YPtBi with both LDA and GGA. Optical properties are calculated in terms of dielectric function and we have calculated dielectric constant, optical reflectivity, absorption co-efficient, optical conductivity, refractive index and electron energy loss in the energy range 0 – 14 eV. We have found higher dielectric constants with GGA in comparison to LDA that imply YPtBi is excellent materials in solar cell applications. Also, YPtBi possess high refractive index in the visible range and it is optically isotropic.