<?xml version="1.0"?>
<ownershipDocument>

    <schemaVersion>X0306</schemaVersion>

    <documentType>4</documentType>

    <periodOfReport>2016-03-07</periodOfReport>

    <issuer>
        <issuerCik>0001568669</issuerCik>
        <issuerName>PENNYMAC FINANCIAL SERVICES, INC.</issuerName>
        <issuerTradingSymbol>PFSI</issuerTradingSymbol>
    </issuer>

    <reportingOwner>
        <reportingOwnerId>
            <rptOwnerCik>0001275713</rptOwnerCik>
            <rptOwnerName>SPECTOR DAVID</rptOwnerName>
        </reportingOwnerId>
        <reportingOwnerAddress>
            <rptOwnerStreet1>C/O PENNYMAC FINANCIAL SERVICES, INC.</rptOwnerStreet1>
            <rptOwnerStreet2>6101 CONDOR DRIVE</rptOwnerStreet2>
            <rptOwnerCity>MOORPARK</rptOwnerCity>
            <rptOwnerState>CA</rptOwnerState>
            <rptOwnerZipCode>93021</rptOwnerZipCode>
            <rptOwnerStateDescription></rptOwnerStateDescription>
        </reportingOwnerAddress>
        <reportingOwnerRelationship>
            <isDirector>1</isDirector>
            <isOfficer>1</isOfficer>
            <officerTitle>President &amp; Chief Operating Of</officerTitle>
        </reportingOwnerRelationship>
    </reportingOwner>

    <derivativeTable>
        <derivativeTransaction>
            <securityTitle>
                <value>Nonstatutory Stock Option (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>11.28</value>
            </conversionOrExercisePrice>
            <transactionDate>
                <value>2016-03-07</value>
            </transactionDate>
            <transactionCoding>
                <transactionFormType>4</transactionFormType>
                <transactionCode>A</transactionCode>
                <equitySwapInvolved>0</equitySwapInvolved>
            </transactionCoding>
            <transactionTimeliness></transactionTimeliness>
            <transactionAmounts>
                <transactionShares>
                    <value>71161</value>
                </transactionShares>
                <transactionPricePerShare>
                    <value>0</value>
                </transactionPricePerShare>
                <transactionAcquiredDisposedCode>
                    <value>A</value>
                </transactionAcquiredDisposedCode>
            </transactionAmounts>
            <exerciseDate>
                <value>2017-03-07</value>
            </exerciseDate>
            <expirationDate>
                <value>2026-03-06</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>71161</value>
                    <footnoteId id="F1"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>71161</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeTransaction>
        <derivativeHolding>
            <securityTitle>
                <value>Cl A Units of Private Nat'l Mortgage Acceptance Company, LLC</value>
                <footnoteId id="F2"/>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F2"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F2"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>1234125</value>
                    <footnoteId id="F2"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>1234125</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Cl A Units of Private Nat'l Mortgage Acceptance Company, LLC</value>
                <footnoteId id="F2"/>
            </securityTitle>
            <conversionOrExercisePrice>
                <footnoteId id="F2"/>
            </conversionOrExercisePrice>
            <exerciseDate>
                <footnoteId id="F2"/>
            </exerciseDate>
            <expirationDate>
                <footnoteId id="F2"/>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>465604</value>
                    <footnoteId id="F2"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>465604</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>I</value>
                </directOrIndirectOwnership>
                <natureOfOwnership>
                    <value>ST Family Investment Company LLC</value>
                    <footnoteId id="F3"/>
                </natureOfOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Nonstatutory Stock Option (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>21.03</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2014-06-13</value>
            </exerciseDate>
            <expirationDate>
                <value>2023-06-12</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>40735</value>
                    <footnoteId id="F4"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>40735</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Nonstatutory Stock Option (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>17.26</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2015-02-26</value>
            </exerciseDate>
            <expirationDate>
                <value>2024-02-25</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>72301</value>
                    <footnoteId id="F5"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>72301</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
        <derivativeHolding>
            <securityTitle>
                <value>Nonstatutory Stock Option (Right to Buy)</value>
            </securityTitle>
            <conversionOrExercisePrice>
                <value>17.52</value>
            </conversionOrExercisePrice>
            <exerciseDate>
                <value>2016-03-03</value>
            </exerciseDate>
            <expirationDate>
                <value>2025-03-02</value>
            </expirationDate>
            <underlyingSecurity>
                <underlyingSecurityTitle>
                    <value>Class A Common Stock</value>
                </underlyingSecurityTitle>
                <underlyingSecurityShares>
                    <value>61120</value>
                    <footnoteId id="F6"/>
                </underlyingSecurityShares>
            </underlyingSecurity>
            <postTransactionAmounts>
                <sharesOwnedFollowingTransaction>
                    <value>61120</value>
                </sharesOwnedFollowingTransaction>
            </postTransactionAmounts>
            <ownershipNature>
                <directOrIndirectOwnership>
                    <value>D</value>
                </directOrIndirectOwnership>
            </ownershipNature>
        </derivativeHolding>
    </derivativeTable>

    <footnotes>
        <footnote id="F1">This nonstatutory stock option to purchase 71,161 shares of Class A Common Stock of the Issuer will vest as to one-third of the optioned shares on each of March 7, 2017, 2018 and 2019, subject to the Reporting Person's committed service through each date.</footnote>
        <footnote id="F2">Pursuant to the terms of an exchange agreement, Class A Units of Private National Mortgage Acceptance Company, LLC are exchangeable for shares of Class A Common Stock of PennyMac Financial Services, Inc. on a one-for-one basis, subject to customary conversion rate adjustments, from and after the closing of PennyMac Financial Services, Inc.'s initial public offering.</footnote>
        <footnote id="F3">These securities are held by ST Family Investment Company LLC, of which Mr. Spector is the sole manager. Mr. Spector disclaims beneficial ownership of these securities except to the extent of his pecuniary interest therein, and the inclusion of these shares in this report shall not be deemed an admission of beneficial ownership of all of the reported shares for purposes of Section 16 or for any other purpose.</footnote>
        <footnote id="F4">This nonstatutory stock option to purchase 40,735 shares of Class A Common Stock of the Issuer will vest as to one-third of the optioned shares on each of June 13, 2014, 2015 and 2016, subject to the Reporting Person's continued service through each date.</footnote>
        <footnote id="F5">This nonstatutory stock option to purchase 72,301 shares of Class A Common Stock of the Issuer will vest as to one-third of the optioned shares on each of February 26, 2015, 2016 and 2017, subject to the Reporting Person's continued service through each date.</footnote>
        <footnote id="F6">This nonstatutory stock option to purchase 61,120 shares of Class A Common Stock of the Issuer will vest as to one-third of the optioned shares on each of March 3, 2016, 2017 and 2018, subject to the Reporting Person's continued service through each date.</footnote>
    </footnotes>

    <ownerSignature>
        <signatureName>/s/ Derek W. Stark, attorney-in-fact for Mr. Spector</signatureName>
        <signatureDate>2016-03-09</signatureDate>
    </ownerSignature>
</ownershipDocument>
