Document and Entity InformationStatement [Table]Statement [Line Items]StatementEntity Registrant NameEntity Central Index KeyDocument TypeDocument Period End DateEntity Interactive Data CurrentAmendment FlagCurrent Fiscal Year End DateEntity Current Reporting StatusEntity Filer CategoryEntity Common Stock, Shares OutstandingEntity Small BusinessEntity Emerging Growth CompanyEntity Shell CompanyDocument Fiscal Year FocusDocument Fiscal Period FocusCONSOLIDATED BALANCE SHEETSRelated Party [Axis]Related Party [Domain]Related Party [Domain]Represents information pertaining to the PennyMac Mortgage Investment Trust.Penny Mac Mortgage Investment Trust [Member]PMTClass of Stock [Axis]Class Of Stock [Domain]Class of Stock [Domain]Common Class A [Member]Common StockAssets [Abstract]ASSETSAssets:CashCash (includes $184,278 and $108,174 pledged to creditors)Short-term InvestmentsShort-term investments at fair valueMortgages Held-for-sale, Fair Value DisclosureLoans held for saleTotal fair valueLoans held for sale at fair value (includes $3,475,090 and $2,478,858 pledged to creditors)Loans and Leases Receivable, Related PartiesAssets purchased from PennyMac Mortgage Investment Trust under agreements to resell pledged to creditorsDerivative AssetDerivative assetsTotal derivative assetsNet amounts of assets presented in the balance sheetAdvances made by a mortgage loan servicer to to meet contractual principal and interest remittance requirements for investors, pay property taxes and insurance premiums, legal expenses and other protective advances to maintain, repair and market real estate properties on behalf of investors.Servicing AdvancesServicing advances, net (includes valuation allowance of $66,650 and $70,582; $151,384 and $162,895 pledged to creditors)Servicing AssetCarrying valueMortgage servicing rights at fair value (includes $2,710,342 and $2,807,333 pledged to creditors)Real Estate Acquired Through ForeclosureReal estate acquired in settlement of loansOperating Lease, Right-of-Use AssetOperating lease right-of-use assetsProperty, Plant and Equipment, NetFurniture, fixtures, equipment and building improvements, net (includes $0 and $16,281 pledged to creditors)Capitalized Computer Software, NetCapitalized software, net (includes $15,097 and $1,017 pledged to creditors)Investments in Affiliates, Subsidiaries, Associates, and Joint Ventures, Fair Value DisclosureFair value of PennyMac Mortgage Investment Trust sharesInvestment in PennyMac Mortgage Investment Trust at fair valueInvestment in PennyMac Mortgage Investment TrustDue from AffiliatesReceivable, from affiliatesTotal due from affiliateReceivableRepresents the unpaid principal balance of mortgage loans eligible but not required to be repurchased from investors due to borrower delinquency.Loans Eligible for Repurchase [Policy Text Block].Loans eligible for repurchaseOther AssetsOtherAssets.Total assetsSegment assets at year endLiabilities [Abstract]LIABILITIESAssets Sold under Agreements to Repurchase, Repurchase LiabilityAssets sold under agreements to repurchaseTotal loans sold under agreements to repurchaseNet amount of liabilities in the consolidated balance sheetParticipation certificates in mortgage loans that have been pooled with Fannie Mae, Freddie Mac or Ginnie Mae, are issued to a lender pending the securitization of the mortgage loans and sale of the resulting securities.Mortgage Loan Participation and Sale AgreementMortgage loans participation purchase and sale agreementsMortgage loan participation and sale agreement secured by mortgage loan participation certificatesNotes PayableNotes payableNotes payableCapital Lease ObligationsObligations under capital leaseUnpaid principal balanceRepresents the issuance to PMT of the right to receive excess servicing spread cash flows relating to certain mortgage servicing rights. The Company retains all ancillary income associated with servicing the loans and a fixed base servicing fee. The Company continues to be the servicer of the mortgage loans and retains all servicing obligations, including responsibility to make servicing advances.Excess Servicing Spread Financing at Fair ValueCarrying valueExcess servicing spread financing at fair value payable to affiliateExcess servicing spread financing payable to PennyMac Mortgage Investment Trust at fair valueDerivative LiabilityDerivative liabilitiesNet amounts of liabilities presented in the consolidated balance sheetNet amounts of liabilities presented in the consolidated balance sheetOperating Lease, LiabilityLease liabilityTotalOperating lease liabilitiesAccounts Payable and Accrued LiabilitiesAccounts payable and accrued expensesDeferred rentServicing LiabilityCarrying valueMortgage servicing liabilities at fair valueMortgage servicing liabilitiesDue to AffiliatePayable to affiliatesPayable to affiliatesRepresents the amount payable under a tax receivable agreement with PennyMac’s existing unitholders on the date of the Company’s initial public offering that will provide for the payment by the Company to PennyMac’s exchanged unitholders in an amount equal to 85% of the amount of the benefits, if any, that the Company is deemed to realize as a result of (i) increases in tax basis resulting from such unitholders’ exchanges and (ii) certain other tax benefits related to entering into the tax receivable agreement, including tax benefits attributable to payments under the tax receivable agreement.Payable under Tax Receivable AgreementPayable to exchanged Private National Mortgage Acceptance Company, LLC unitholders under tax receivable agreementAccrued Income TaxesIncome taxes payableRepresents the unpaid principal balance of mortgage loans eligible but not required to be repurchased from investors due to borrower delinquency.Liability for Loans Eligible for RepurchaseLiability for loans eligible for repurchaseThe Company's estimate of the losses that it expects to incur in the future as a result of its breach of the representations and warranties that it provides to the purchasers and insurers of the mortgage loans it has sold.Representations and Warranties LiabilityBalance at end of periodBalance at beginning of periodLiability for losses under representations and warrantiesLiabilitiesTotal liabilitiesCommitments and ContingenciesCommitments and contingencies - Note 14Stockholders' Equity, Including Portion Attributable to Noncontrolling Interest [Abstract]STOCKHOLDERS' EQUITYCommon Stock, Value, IssuedCommon stock - authorized 200,000,000 shares of $0.0001 par value; issued and outstanding, 78,304,899 and 77,494,332 shares respectivelyAdditional Paid in Capital, Common StockAdditional paid-in capitalRetained Earnings (Accumulated Deficit)Retained earningsStockholders' Equity, Including Portion Attributable to Noncontrolling InterestBalanceBalanceTotal stockholders' equityLiabilities and EquityTotal liabilities and stockholders' equityCash Collateral for Borrowed SecuritiesCash pledged to creditorsPledged Assets Separately Reported, Loans Pledged as Collateral, at Fair ValueMortgage loans held for sale, pledged to creditorsPledged Assets Separately Reported, Loans Pledged as Collateral, at Fair Value, TotalRepresents the valuation allowance related to servicing advances made by a mortgage loan servicer to meet contractual principal and interest remittance requirements for investors, pay property taxes and insurance premiums, legal expenses and other protective advances so as to maintain, repair and market real estate properties on behalf of investors.Servicing advances, net, valuation allowanceServicing advances, net, valuation allowanceAggregate amount of servicing advances pledged to creditors.Servicing Advances Pledged to CreditorsServicing advances pledged to creditorsServicing advancesServicing Asset at Fair Value, AmountBalance at end of periodBalance at beginning of periodMortgage servicing rights at fair valueMortgage servicing rights, at fair valueAggregate amount of property, plant, and equipment pledged to creditors.Pledged Assets Separately Reported, Property Plant and Equipment Pledged As CollateralFurniture, fixtures, equipment and building improvements pledged to creditorsAggregate amount of capitalized computer software pledged to creditors.Pledged Assets Separately Reported Capitalized Computer Software Pledged As CollateralCapitalized software pledged to creditorsCommon Stock, Shares AuthorizedCommon stock, shares authorizedCommon Stock, Par or Stated Value Per ShareCommon stock, par value (in dollars per share)Common Stock, Shares, IssuedCommon stock, shares issuedCommon Stock, Shares, OutstandingCommon stock, shares outstandingCONSOLIDATED STATEMENTS OF INCOMERepresents information pertaining to the entities forming a part of investment funds.Investment Funds [Member]Investment FundsRevenues [Abstract]Revenues:Not available.Servicing Income [Abstract]Net loan servicing fees:Not available.Banking Fees And Commission AbstractLoan servicing feesContractually Specified Servicing Fees, AmountFrom non-affiliates and affiliatesLoan servicing feesContractual servicing feesAncillary Fee Income Generated by Servicing Financial Assets, AmountOtherAmount of revenue from servicing real estate mortgages, and other financial assets held by others. Includes premiums received in lieu of regular servicing fee.Servicing FeeLoan servicing feesRepresents the amortization, provisions for losses due to impairment, fair value changes, and hedging results relating to mortgage servicing rights.Mortgage Servicing Rights MSR Amortization Impairment Fair Value Change From Non AffiliatesChange in fair value of mortgage servicing rights and mortgage servicing liabilitiesFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Gain (Loss) Included in EarningsGain (loss) recognizedChanges in fair value included in incomeChange in fair valueRepresents the amortization, provisions for losses due to impairment, fair value changes, and hedging results relating to mortgage servicing rights and changes in fair value of excess servicing spread payable to PennyMac Mortgage Investment Trust.Mortgage Servicing Rights MSR Amortization Impairment Fair Value ChangeChange in fair value of excess servicing spread payable to PennyMac Mortgage Investment TrustChange in fair value of mortgage servicing rights, mortgage servicing liabilities and excess servicing spreadAmount of revenue from servicing real estate mortgages, and other financial assets held by others. Includes premiums received in lieu of regular servicing fee and fair value changes and hedging results relating to mortgage servicing rights and excess servicing spread payable to PMT.Servicing Fee NetNet loan servicing feesNet loan servicing feesBank Servicing FeesGain (Loss) on Sales of Loans, Net [Abstract]Net gains on loans held for sale at fair value:Gain Loss On Sales Of Loans From Non-affiliates.Gain Loss on Sales of Loans from Non AffiliatesFrom non-affiliatesFrom non-affiliatesGain Loss On Sales Of Loans From Affiliates.Gain Loss On Sales Of Loans From AffiliatesFrom PennyMac Mortgage Investment TrustTotal of gain on sale of loans and MSR recaptureGain (Loss) on Sales of Loans, NetNet gains on loans held for sale at fair valueNet gains on loans held for sale at fair valueNet gains on loans held for sale at fair valueFees charged to correspondent lenders and borrowers relating to the purchase or origination of mortgage loans from non-affiliates.Loan Originations Fees From Non AffiliatesLoan origination fees from non-affiliatesRepresents mortgage loan origination fees charged to PennyMac Mortgage Investment Trust relating to mortgage loan origination services provided on its behalf.Loan Originations Fees From AffiliatesLoan origination fees from PennyMac Mortgage Investment TrustFees charged to correspondent lenders and borrowers relating to the purchase or origination of mortgage loans.Loan Originations FeesLoan origination feesLoan origination feesRepresent fees for services the company performs on behalf of PMT in connection with the acquisition, packaging and sale of mortgage loans.Loan Fulfillment Fees Receivable from AffiliateFulfillment fee revenueFulfillment fees from PennyMac Mortgage Investment TrustNet Interest IncomeNet interest income:Net interest income (expense):Interest and Other Income [Abstract]Interest income:Represents the amount of interest income from non affiliates.Interest Income Operating from Non AffiliatesFrom non-affiliatesInterest Income, Related PartyInterest income on receivable from PennyMac Mortgage Investment TrustFrom PennyMac Mortgage Investment TrustInterest Income, OperatingInterest incomeInterest incomeInterest Expense [Abstract]Interest expense:Interest expense from non-affiliates.Interest Expense From Non-affiliatesTo non-affiliatesInterest expense, non-affiliatesRepresents the interest expense from affiliate entity.Interest Expense From AffiliatesInterest expenseTo PennyMac Mortgage Investment TrustTo PennyMac Mortgage Investment Trust Excess servicing spread financing at fair valueInterest ExpenseInterest expenseInterest expenseInterest Income (Expense), NetNet interest incomeNot available.Management Fee Revenue AbstractManagement fees, net:Revenues, comprised of base and incentive revenue derived from the management of joint ventures, managing third-party properties, or another entity's operations.Management Fee RevenueManagement feesManagement feesAmount of performance incentive revenue earned by the entity based on the investment results achieved.Carried Interest Performance FeesCarried Interest from Investment FundsCarried Interest from Investment FundsAmount recorded in earnings for change in the fair value of the investment in and dividends received from the affiliates.Investments in and Advances to Affiliates Change in Fair Value of Investment in and Dividends ReceivedChange in fair value of investment in and dividends received from affiliateBalance at end of periodRepresents changes in fair value and gains and losses on sale of real estate acquired in settlement of loans.Change in Fair Value of Real Estate Acquired in Settlement of LoansResult of real estate acquired in settlement of loansRevenue from Contract with Customer, Excluding Assessed TaxOtherRevenues, Net of Interest ExpenseTotal net revenueOperating Expenses [Abstract]ExpensesLabor and Related ExpenseCompensationRepresents the amount of mortgage​ loan collection​ and liquidation expenses.Mortgage​ Loan ​Collection ​And ​Liquidation ​ExpensesServicingLoan Processing FeeLoan originationCommunications and Information TechnologyTechnologyRepresents occupancy and equipment expense.Occupancy And EquipmentOccupancy and equipmentProfessional FeesProfessional servicesOther ExpensesOtherOperating ExpensesExpensesTotal expensesIncome (Loss) from Continuing Operations before Equity Method Investments, Income Taxes, Extraordinary Items, Noncontrolling InterestIncome before provision for income taxesIncome Tax Expense (Benefit)Provision for income taxesNet Income (Loss), Including Portion Attributable to Noncontrolling InterestNet incomeNet incomeNet Income (Loss) Attributable to Noncontrolling InterestLess: Net income attributable to noncontrolling interestNet Income (Loss) Attributable to ParentNet income attributable to common stockholdersNet income attributable to PennyMac Financial Services, Inc. common stockholdersNet income attributable to PennyMac Financial Services, Inc. common stockholdersEarnings Per Share of Common StockEarnings per shareEarnings Per Share, BasicBasic (in dollars per share)Basic earnings per share of common stock (in dollars per share)Earnings Per Share, DilutedDiluted (in dollars per share)Diluted earnings per share of common stock (in dollars per share)Weighted Average Number of Shares Outstanding, Diluted [Abstract]Weighted-average shares outstandingWeighted Average Number of Shares Outstanding, BasicWeighted-average common stock outstanding applicable to basic earnings per shareBasic (in shares)Weighted-average common stock outstandingWeighted Average Number of Shares Outstanding, DilutedDiluted (in shares)Weighted-average shares of common stock outstanding applicable to diluted earnings per shareCONSOLIDATED STATEMENTS OF CHANGES IN STOCKHOLDERS' EQUITYEquity Components [Axis]Equity Component [Domain]Equity Component [Domain]Additional Paid In Capital [Member]Additional paid-in capitalRetained Earnings [Member]Retained earningsNoncontrolling Interest [Member]Noncontrolling interest in Private National Mortgage Acceptance Company, LLCIncrease (Decrease) in Stockholders' Equity [Roll Forward]Changes in stockholders' equityShares, IssuedBalance (in shares)Balance (in shares)Cumulative Effect of New Accounting Principle in Period of AdoptionCumulative effect of change in accounting principle - accounting for all existing classes of mortgage servicing rights at fair valueStockholders' Equity, Including Portion Attributable to Noncontrolling Interest, Adjusted BalanceBalance after adjustmentNumber of shares of stock issued as of the balance sheet date, including shares that had been issued and were previously outstanding but which are now held in the treasury after adjustment.Shares Issued After AdjustmentBalance after adjustment (in shares)Stock Issued During Period, Value, Share-based Compensation, Net of ForfeituresStock and unit-based compensationStock Issued During Period, Shares, Share-based Compensation, Net of ForfeituresStock and unit-based compensation (in shares)Stock Issued During Period, Value, Issued for ServicesIssuance of Class A common stock and common stock in settlement of director feesIssuance of common stock in settlement of director feesStock Issued During Period, Shares, Issued for ServicesIssuance of common stock in settlement of director fees (in shares)Stock Issued During Period, Value, Conversion of UnitsExchange of Class A units of Private National Mortgage Acceptance Company, LLC to Class A common stock of PennyMac Financial Services, Inc.Increase in the Company's additional paid-in capital for exchanges of Class A units of Private National Mortgage Acceptance Company, LLC to Class A common stock of PennyMac Financial Services, Inc.Stock Issued During Period, Shares, Conversion of UnitsExchange of Class A units of Private National Mortgage Acceptance Company, LLC to Class A common stock of PennyMac Financial Services, Inc. (in shares)Shares of Class A common stock of PennyMac Financial Services, Inc. issued pursuant to exchange of Class A units of Private National Mortgage Acceptance Company, LLC by noncontrolling interest unitholders and issued as equity compensation (in shares)Stock Repurchased and Retired During Period, ValueRepurchase of common stockCost of shares of common stock repurchasedStock Repurchased and Retired During Period, SharesRepurchase of common stock (in shares)Shares of common stock repurchasedRepresents the amount of increase (decrease) in additional paid in capital (APIC) under the tax agreement.Adjustments to Additional Paid in Capital under Tax AgreementTax effect of exchange of Class A units of Private National Mortgage Acceptance Company, LLC to Class A common stock of PennyMac Financial Services, Inc.CONSOLIDATED STATEMENTS OF CASH FLOWSNet Cash Provided by (Used in) Operating Activities [Abstract]Cash flow from operating activitiesAdjustments to Reconcile Net Income (Loss) to Cash Provided by (Used in) Operating Activities [Abstract]Adjustments to reconcile net income to net cash used in operating activities:Represents capitalization of delinquent mortgage interest to mortgage loan balances pursuant to loan modifications.Capitalization Of Interest On Mortgage Loans Held For Sale At Fair ValueCapitalization of interest on loans held for sale at fair valueRepresents interest expense accrued and added to fair value of excess servicing spread financing.Excess Servicing Spread Financing at Fair Value Recognized in Interest ExpenseAccrual of interest on excess servicing spread financingAmortization of Debt Issuance Costs and DiscountsAmortization of net debt issuance (premiums) and costsAmount recorded in earnings for change in the fair value of the investment in and dividends received from the affiliates.Investments in and Advances to Affiliates Change in Fair Value of InvestmentChange in fair value of investment in common shares of PennyMac Mortgage Investment TrustGains (Losses) on Sales of Other Real EstateResults of real estate acquired in settlement of loansShare-based CompensationStock based compensation expenseRepresents provision for losses on servicing advances anticipated to be uncollectable relating to mortgage loans serviced for others.Provision For Servicing Advance LossesProvision for servicing advance lossesDepreciation, Depletion and AmortizationDepreciation and amortizationAmount of amortization expense attributable to right-of-use asset from operating lease.Lessee Operating Lease Right Of Use Asset AmortizationAmortization of right-to-use assetsPayments to Purchase Mortgage Loans Held-for-salePurchase of loans held for sale from PennyMac Mortgage Investment TrustPayments for Origination of Mortgage Loans Held-for-saleOrigination of loans held for saleRepresents the payment made for purchase of loans from Agency-backed securities to be modified and resold into new securitizations.Payments for Purchase of Modified Mortgage Loans Held for Sale from AgenciesPurchase of loans from Ginnie Mae securities and early buyout investors for modification and subsequent saleProceeds from Sale of Mortgage Loans Held-for-saleSale and principal payments of loans held for sale to non-affiliatesProceeds from Sale of Loans Held-for-saleSale of loans held for sale to PMTSale of loans held for sale to Penny Mac Mortgage Investment TrustProceeds from sale of mortgage loans held for sale to PennyMac Mortgage Investment TrustRepresents the cash outflow for payment for repurchase of loans subject to representations and warranties.Payment for Repurchase of Loans Subject to Representations and WarrantiesRepurchase of loans subject to representations and warrantiesRepresents the amount of settlement of repurchase agreement derivatives.Settlement Of Repurchase Agreement DerivativesSettlement of repurchase agreement derivativesIncrease (decrease) in advances made by a mortgage loan servicer to meet contractual principal and interest remittance requirements for investors, pay property taxes and insurance premiums, legal expenses and other protective advances to maintain, repair and market real estate properties on behalf of investors.Increase (Decrease) in Servicing AdvancesDecrease in servicing advancesProceeds from Sale of Real EstateSale of real estate acquired in settlement of loansIncrease (Decrease) Due from Affiliates(Increase) decrease in receivable from affiliatesIncrease (Decrease) in Other Operating Assets(Increase) decrease in other assetsRepresents the decrease in operating lease liabilities.Decrease in Operating Lease LiabilitiesDecrease in operating lease liabilitiesIncrease (Decrease) in Accounts Payable and Accrued LiabilitiesIncrease in accounts payable and accrued expensesIncrease (Decrease) in Due to AffiliatesDecrease in payable to affiliateIncrease (Decrease) in Income Taxes PayableIncrease in income taxes payableNet Cash Provided by (Used in) Operating ActivitiesNet cash (used in) provided by operating activitiesNet Cash Provided by (Used in) Investing Activities [Abstract]Cash flow from investing activitiesPayments for (Proceeds from) Short-term InvestmentsDecrease in short-term investmentsRepresents the repayment of assets purchased from related party under agreement to resell.Repayment Of Assets Purchased From Related Party Under Agreement To ResellNet change in assets purchased from PMT under agreement to resellPayments for (Proceeds from) Derivative Instrument, Investing ActivitiesNet settlement of derivative financial instruments used for hedgingPayments to Acquire Mortgage Servicing Rights (MSR)Purchase of mortgage servicing rightsPayments to Acquire Property, Plant, and EquipmentPurchase of furniture, fixtures, equipment and leasehold improvementsPayments to Acquire SoftwareAcquisition of capitalized softwareIncrease (Decrease) in Margin Deposits OutstandingDecrease (increase) in margin depositsNet Cash Provided by (Used in) Investing ActivitiesNet cash provided by (used in) investing activitiesNet Cash Provided by (Used in) Financing Activities [Abstract]Cash flow from financing activitiesProceeds from sales of mortgage loans under agreements to repurchase.Sale of Loans under Repurchase AgreementsSale of assets under agreements to repurchasePayments made during the period to repurchase assets sold under agreements to repurchase.Repurchase Of Assets Sold Under Agreements To RepurchaseRepurchase of assets sold under agreements to repurchaseRepresents the cash inflow from issuance of mortgage loan participation borrowings.Issuance Of Mortgage Loan Participation CertificatesIssuance of mortgage loan participation purchase and sale certificatesRepresents the cash outflow from repayment of mortgage loan participation certificates.Repayment Of Mortgage Loan Participation CertificatesRepayment of mortgage loan participation purchase and sale certificatesThe cash inflow in debt from borrowings on note payable.Proceeds From Borrowings On Note PayableAdvances on notes payableCash outflow from repayments on note payable.Repayments Of Note PayableRepayments of notes payableRepayments of notes payableProceeds from Long-term Capital Lease ObligationsAdvances of obligations under capital leaseFinance Lease, Principal PaymentsRepayments of obligations under capital leaseRepresents the cash outflow from repayment of excess servicing spread financing.Repayment of Excess Servicing Spread FinancingRepayment of excess servicing spread financingRepaymentsPayments of Debt Issuance CostsPayment of debt issuance costsProceeds from Stock Options ExercisedIssuance of common stock pursuant to exercise of stock optionsPayments for Repurchase of Common StockRepurchase of common stockPayments Related to Tax Withholding for Share-based CompensationPayment of withholding taxes relating to stock-based compensationNet Cash Provided by (Used in) Financing ActivitiesNet cash provided by (used in) financing activitiesCash, Cash Equivalents, Restricted Cash and Restricted Cash Equivalents, Period Increase (Decrease), Including Exchange Rate EffectNet increase in cash and restricted cashCash, Cash Equivalents, Restricted Cash and Restricted Cash EquivalentsCash and restricted cash at end of periodCash and restricted cash at beginning of periodRestricted CashRestricted cash included in Other assetsOrganizationOrganization, Consolidation and Presentation of Financial Statements Disclosure [Text Block]OrganizationNot available.Basis of Presentation and Recently Issued Accounting PronouncementsBasis of Accounting [Text Block]Basis of Presentation and Recently Issued Accounting PronouncementsConcentration of RiskConcentration Risk Disclosure [Text Block]Concentration of RiskTransactions with AffiliatesRelated Party Transactions Disclosure [Text Block]Transactions with AffiliatesLoan Sales and Servicing ActivitiesTransfers and Servicing of Financial Assets [Text Block]Loan Sales and Servicing ActivitiesFair ValueFair Value Disclosures [Text Block]Fair ValueLoans Held for Sale at Fair ValueMortgage Loans on Real Estate, by Loan Disclosure [Text Block]Loans Held for Sale at Fair ValueDerivative Financial InstrumentsDerivative Instruments and Hedging Activities Disclosure [Text Block]Derivative Financial InstrumentsMortgage Servicing Rights and Mortgage Servicing LiabilitiesRepresents the entire disclosure of mortgage servicing rights.Mortgage Servicing Rights Disclosure [Text Block]Mortgage Servicing Rights and Mortgage Servicing LiabilitiesLeasesLessee, Operating Leases [Text Block]LeasesBorrowingsDebt Disclosure [Text Block]BorrowingsLiability for Losses Under Representations and WarrantiesThe entire disclosure for the entity's liability for representations and warranties.Liability for Representations and Warranties Disclosure [Text Block]Liability for Losses Under Representations and WarrantiesIncome TaxesIncome Tax Disclosure [Text Block]Income TaxesCommitments and Contingencies.Commitments and Contingencies Disclosure [Text Block]Commitments and ContingenciesStockholders' Equity.Stockholders' Equity Note Disclosure [Text Block]Stockholders' EquityNoncontrolling Interest.Noncontrolling Interest Disclosure [Text Block]Noncontrolling InterestNet Gains on Loans Held for SaleThe entire disclosure for gains (losses) on mortgage loans held for sale.Mortgage Loans Held For Sale Gain (Loss) Disclosure [Text Block]Net Gains on Loans Held for SaleInterest Income and Interest Expense Disclosure [Text Block]Net Interest IncomeStock-based CompensationDisclosure of Compensation Related Costs, Share-based Payments [Text Block]Stock-based CompensationEarnings Per Share [Text Block]Earnings Per Share of Common StockSupplemental Cash Flow InformationCash Flow, Supplemental Disclosures [Text Block]Supplemental Cash Flow InformationRegulatory Capital and Liquidity RequirementsRegulatory Capital Requirements for Mortgage Companies Disclosure [Text Block]Regulatory Capital and Liquidity RequirementsSegmentsSegment Reporting Disclosure [Text Block]SegmentsSubsequent EventsSubsequent Events [Text Block]Subsequent EventsSchedule of Related Party Transactions, by Related Party [Table]Related Party Transaction [Line Items]Transactions with AffiliatesTabular disclosure of related party transactions pertaining to lending activity between the entity and related parties.Schedule of Related Party Transactions Lending Activity [Table Text Block]Summary of lending activity between the Company and affiliateTabular disclosure of related party transactions pertaining to mortgage loan servicing fees.Schedule of Related Party Transactions Mortgage Loan Servicing Fees Earned [Table Text Block]Summary of loan servicing fees earned from PMTTabular disclosure of related party transactions pertaining to base management and performance incentive fees.Schedule of Related Party Transactions Base Management and Performance Incentive Fees Earned [Table Text Block]Summary of management fees earnedTabular disclosure of related party transactions pertaining to foregoing reimbursement of expenses incurred by affiliate.Schedule of Related Party Transactions Reimbursement of Expenses [Table Text Block]Summary of reimbursement of expensesTabular disclosure of related party transactions pertaining to investment activity between the entity and related parties.Schedule of Related Party Transactions Investment Activity Table Text Block]Summary of investing activity between the Company and affiliateTabular disclosure of related party transactions pertaining to financing activity between the entity and related parties.Schedule of Related Party Transactions Financing Activity [Table Text Block]Summary of financing activity between the Company and affiliateSchedule of Related Party Transactions [Table Text Block]Summary of amounts due from and payable to affiliateTabular disclosure of cash flows between the entity and transferees upon sale of mortgage loans in transactions where the entity maintains continuing involvement with the mortgage loans.Schedule of Cash Flows Between Company and Transferees upon Sale of Mortgage Loans in Transactions [Table Text Block]Summary of cash flows between the Company and transferees upon sale of loans in transactionsSummary of unpaid principal balance and credit performance of mortgage loans sol by the Company in which it maintains continuing performance.Schedule Of Sale Of Loans Between Company And Transferees Upon Sale Of Mortgage Loans In Transactions Table Text BlockSummary of sale of loans between the Company and transferees upon sale of loans in transactionsTabular disclosure of mortgage servicing portfolio of the entity.Schedule of Mortgage Servicing Portfolio [Table Text Block]Summary of servicing portfolioTabular disclosure of the geographical distribution of loans included in the entity's servicing portfolio for the top five states as measured by the total unpaid principal balance.Schedule of Geographical Distribution of Mortgage Servicing Portfolio [Table Text Block]Summary of the geographical distribution of loans for the top five and all other states as measured by the total unpaid principal balance (UPB)Fair Value, by Balance Sheet Grouping [Table]Asset Class [Axis]Fair Value Assets Measured On Recurring Basis Unobservable Input Reconciliation By Asset Class [Domain]Asset Class [Domain]Interest Rate Lock Commitments [Member]Interest rate lock commitmentsRepresents information pertaining to the mortgage loans held for sale.Mortgage Loans Held For Sale [Member]Loans held for saleFair Value, Balance Sheet Grouping, Financial Statement Captions [Line Items]Fair ValueSchedule of Fair Value, Assets and Liabilities Measured on Recurring Basis [Table Text Block]Summary of financial statement items measured at estimated fair value on a recurring basisFair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table Text Block]Summary of roll forward of items measured using Level 3 inputs on a recurring basisTabular disclosure of the amounts of gains and losses from fair value changes included in earnings and in which line in the income statement those gains and losses are reported whether or not combined with gains and losses from items required to be accounted for at fair value.Schedule of Fair Value Option Changes in Fair Value Gain (Loss) [Table Text Block]Summary of net gains (losses) from changes in fair values included in earnings for financial statement items carried at fair valueTabular disclosure of the amount of the difference between the aggregate fair value and the aggregate unpaid principal balance of loans held as assets for which the fair value option has been elected.Schedule of Fair Value Option Aggregate Difference of Fair Value and Unpaid Principal Balance of Loans [Table Text Block]Schedule of fair value and related principal amounts due upon maturity of assets and liabilities accounted for under the fair value optionFair Value Measurements, Nonrecurring [Table Text Block]Summary of financial statement items measured at estimated fair value on a nonrecurring basisTabular disclosure of the total gains or losses on assets, including financial instruments measured at fair value on a nonrecurring basis.Schedule of Gains (Losses) on Assets Measured at Fair Value on Non Recurring Basis [Table Text Block]Summary of total gains (losses) on assets measured at estimated fair values on a nonrecurring basisFair Value Inputs, Assets, Quantitative Information [Table Text Block]Quantitative summary of key inputs or assumptions used in the valuation of financial statement itemsTabular disclosure of all information related to the key inputs and assumptions (including, at a minimum, but not limited to, and if applicable, quantitative information about discount rates, expected prepayments including the expected weighted-average life of prepaid financial assets, and anticipated credit losses) used in measuring the fair value of assets or liabilities that relate to the transferor's continuing involvement with transferred financial assets, at the time of initial recognition.Schedule of Assumptions for Fair Value at the Time of Initial Recognition of Interests Continued to be Held by Transferor Servicing Assets or Servicing Liabilities [Table Text Block]Quantitative summary of key inputs or assumptions used in the valuation of financial statement items, excluding MSR purchasesTabular disclosure of quantitative information about the inputs used in the valuation of the financial statement items and the effect on the estimated fair value and amortized cost from adverse changes in the assumptions.Schedule of Fair Value Inputs and Sensitivity Analysis of Fair Value and Amortized Cost Adverse Change in Assumptions [Table Text Block]Quantitative summary of key inputs used in the valuation of the MSRs at year end and the effect on estimated fair value from adverse changes in those inputsSchedule of mortgage loans held for sale, information may be provided for each individual mortgage loan or groups of mortgage loans.Schedule of Mortgage Loans on Real Estate [Table Text Block]Summary of loans held for sale at fair valueSchedule of Derivative Instruments [Table Text Block]Summary of derivative financial instrumentsSchedule of Notional Amounts of Outstanding Derivative Positions [Table Text Block]Summary of the notional value activity for derivative contracts used to hedge the IRLCs and inventory of loans held for sale at fair value and MSRsOffsetting Assets [Table Text Block]Summaries of derivative assets and related netting amountsTabular disclosure of derivative and other financial assets by significant counterparty that are not subject to offsetting.Schedule of Derivative and Financial Assets by Significant Counterparty Not Offset [Table Text Block]Summary of the amount of derivative asset positions by significant counterparty after considering master netting arrangements and financial instruments or cash pledgedOffsetting Liabilities [Table Text Block]Summary of net derivative liabilities and assets sold under agreements to repurchase and related netting amountsTabular disclosure of derivative and other financial liabilities by significant counterparty that are not subject to offsetting.Schedule of Derivative and Financial Liabilities by Significant Counterparty Not Offset [Table Text Block]Summary of amount of derivative liabilities and assets sold under agreements to repurchase by significant counterparty after considering master netting arrangements and financial instruments or cash pledgedDerivative Instruments, Gain (Loss) [Table Text Block]Summary of gains (losses) recognized on derivative financial instruments and the respective income statement line itemsSchedule of Servicing Assets at Fair Value [Table Text Block]Schedule of activity in MSRs carried at fair valueSchedule of Servicing Liabilities at Fair Value [Table Text Block]Schedule of activity in mortgage servicing liability carried at fair valueTabular disclosure of servicing fees, late fees and ancillary and other fees related to the servicing assets.Schedule of Net Servicing Income [Table Text Block]Summary of servicing fees, late fees and ancillary and other fees relating to MSRs recorded on the consolidated statements of incomeLease, Cost [Table Text Block]Summary of Company's leasesLessee, Operating Lease, Liability, Maturity [Table Text Block]Schedule of maturities of operating lease liabilitiesSchedule of Repurchase Agreements [Table Text Block]Summary of financial data pertaining to assets sold under agreements to repurchaseSchedule of Underlying Assets of Repurchase Agreements when Amount of Repurchase Agreements Exceeds 10 Percent of Assets [Table Text Block]Summary of maturities of outstanding advances under repurchase agreements by maturity dateSchedule of Repurchase Agreement Counterparties with Whom Repurchase Agreements Exceed 10 Percent of Stockholders' Equity [Table Text Block]Summary of amount at risk relating to the assets sold under agreements to repurchase by counterpartyTabular disclosure of information pertaining to participation arrangements which provide for an undivided beneficial ownership interest in mortgage loans that have been pooled with government sponsored entities sold to a lender pending securitization of the loans and sale of the resulting securities.Schedule Of Mortgage Loan Participations Text BlockSummary of mortgage loan participationsSchedule of Debt [Table Text Block]Summary of note payableTabular disclosure of information pertaining to obligations under capital lease.Schedule of Obligations Under Capital Lease [Table Text Block]Summary of obligations under capital leaseSchedule of Securities Financing Transactions [Table Text Block]Summary of roll forward of Excess Servicing Spread FinancingTabular disclosure of the activities of mortgage loans.Schedule of Mortgage Loans Repurchase Activity [Table Text Block]Summary of repurchase activityClass of Treasury Stock [Table Text Block]Summary of share repurchase activityNet income attributable to the Company's common stockholders and the effects of changes in noncontrolling ownership interest.Noncontrolling Interest, Table Text BlockNoncontrolling InterestTabular disclosure of gains (losses) on mortgage loans held for sale.Mortgage Loans Held For Sale Gain (Loss) Disclosure [Table Text Block]Net Gains on Loans Held for SaleInterest Income and Interest Expense Disclosure [Table Text Block]Summary of net interest incomeTabular disclosure of share-based compensation plans that may be presented in a single table for granted, vested and grant date fair value and compensation expense.Schedule Of Compensation Cost And Grant Date Fair Value And Granted and Vested Units For Share Based Payment Arrangements By Type Table Text BlockSummary of the stock-based compensation activitySchedule of Earnings Per Share, Basic and Diluted [Table Text Block]Summary of basic and diluted earnings per share calculationsSchedule of Antidilutive Securities Excluded from Computation of Earnings Per Share [Table Text Block]Schedule of anti-dilutive shares outstandingSchedule of Cash Flow, Supplemental Disclosures [Table Text Block]Schedule of supplemental cash flow informationSchedule of Compliance with Regulatory Capital Requirements for Mortgage Companies [Table Text Block]Summary of agencies' capital and liquidity requirements by each agencyTabular disclosure of the change in expense allocation method, by segment.Schedule of Segment Reporting Information, Change in Expense Allocation Method, by Segment [Table Text Block]Schedule of change in expense allocation, by segmentRepresents the number of classes of common stock.Number Of Classes Of Common StockNumber of classes of common stockNew Accounting Pronouncements or Change in Accounting Principle [Table]New Accounting Pronouncements or Change in Accounting Principle [Line Items]Recently Issued Accounting PronouncementsRight-of-Use Asset Obtained in Exchange for Operating Lease LiabilityRight-of-use assets obtained in exchange for lease obligationsOperating lease right-of-use assets obtained in exchange for lease obligationConcentration Risk [Table]Concentration Risk Benchmark [Axis]Concentration Risk Benchmark [Domain]Concentration Risk Benchmark [Domain]Sales Revenue Net [Member]Sales RevenueConcentration Risk Type [Axis]Concentration Risk Type [Domain]Concentration Risk Type [Domain]Customer Concentration Risk [Member]Customer Concentration RiskConcentration Risk [Line Items]Concentration of RiskConcentration Risk, PercentagePercentage of total net revenueRelated Party Transaction [Axis]Related Party Transaction [Domain]Related Party Transaction [Domain]Represents information pertaining to the mortgage lending agreement.Mortgage Lending Agreement [Member]Loan Lendingthe administrative fee plus accrued interest and sourcing fee percent.Related Party Administrative Fee Plus Accrued Interest And Sourcing Fee PercentThe administrative fee plus accrued interest and sourcing fee percentThe renewal period that automatically renews at expiration, unless terminated earlier in accordance with the terms of the agreement, for the related party agreement.Related Party Transaction, Agreement Term, Automatic Renewal PeriodRelated party transaction, automatic renewal periodFulfillment fee as a percentage of unpaid principal balance of all other mortgage loans, excluding Ginnie Mae.Related Party Transaction Fulfillment Fee as Percentage of Unpaid Principal Balance of All Other Mortgage Loans Excluding Ginne MaeFulfillment fee as a percent of UPB of all other mortgage loans, excluding Ginnie Mae mortgage loansRelated Party Transactions, Lending Activity [Abstract]Lending activity between the entity and affiliateRepresents the net gains from sale of mortgage loans to related party.Net Gains From Sale Of Mortgage Loans To Related PartyNet gain on loans held for sale to PMTRepresents the recapture expense incurred relating to mortgage loans subject to either MSRs or ESS owned by a related party that were refinanced by the Company.Mortgage Servicing Rights MSRs Recapture RecognizedMortgage servicing rights and excess servicing spread recapture incurredMortgage servicing rights recapture incurredRepresents the unpaid principal balance of loans fulfilled.Related Party Transactions Unpaid Principal Balance Of Loans FulfilledUnpaid principal balance of loans fulfilled for PMTRepresents a fee paid to a related party relating to mortgage loans purchased from the related party through its correspondent lending activities.Related Party Transactions, Sourcing Fees PaidSourcing fees paidRepresents unpaid principal balance of loans purchased.Related Party Transactions Unpaid Principal Balance Of Loans PurchasedUnpaid principal balance of loans purchased from PMTRepresents the tax service fee receivable from transactions with related parties.Related Party Transactions Tax Service Fee ReceivableTax service feeRepresents the the minimum unpaid principal balance of mortgage loans refinanced by the Company, for which a related party previously held the mortgage servicing rights, requiring the Company to transfer the mortgage servicing rights of the new loan to related party.Related Party Transaction Minimum Percent Of Total UPB Of Mortgage Loans Refinanced By The Company Where Related Party Previously Held The MSR Requiring Company To Transfer New MSR To Related PartyMinimum percent of total UPB of loans originated from refinancing of loans which a related party previously held the MSR required to be transferredThe rate is for loans where borrower has declared bankruptcy.Related Party Transaction, Servicing Fee Per Month for Current LoansServicing fees amount per month for current loansRelated Party Transaction, Servicing Fee Per Month for Severely Delinquent LoansRelated Party Transaction, Servicing Fee Per Month for Severely Delinquent LoansServicing fees amount per month for severely delinquent loansRepresents the base servicing fee per month for real estate in settlement of loans.Related Party Transaction Base Servicing Fee Per Month For Real Estate In Settlement Of LoansBase servicing fees per month for REORepresents the rental fee per month per REO for real estate in settlement of loans that when REO properties are leased and receive rent.Related Party Transaction Rental Fee Per Month For Real Estate In Settlement Of LoansRental fee per month per REORepresents the renewal fee, per lease renewal, on REO property.Related Party Transaction Renewal Fee per Lease RenewalRenewal fee, per lease renewal, on REO propertyRepresents the property management fee for real estate in settlement of loans, as a percentage of gross rental income, when the Company provides property management services directly.Related Party Transaction Property Management Fee For Real Estate In Settlement Of Loans Percentage Of Gross Rental IncomeProperty management fees on REOs, as a percent of gross rental incomeRelated Party Transaction, Base Servicing Fee Per Month for Subserviced Fixed Rate LoansRelated Party Transaction, Base Servicing Fee Per Month for Subserviced Fixed Rate LoansBase servicing fees per month for fixed-rate non-distressed loans subservicedRelated Party Transaction, Base Servicing Fee Per Month for Subserviced Adjustable Rate LoansRelated Party Transaction, Base Servicing Fee Per Month for Subserviced Adjustable Rate LoansBase servicing fees per month for adjustable rate non-distressed loans subservicedRelated Party Transaction, Supplemental Fee Per Month for Each Distressed Whole LoanRelated Party Transaction, Supplemental Fee Per Month for Each Distressed Whole LoanSupplemental fee per month for each distressed whole loanThe activity-based fee percent on a related party transaction, due to the Company as a result of a streamline modification.Related Party Transaction Activity-Based Fee Percent For Distressed Whole Mortgage Loans, Streamline ModificationActivity-based fee, percent, due to a streamline modificationThe activity-based fee percent on a related party transaction, due to the Company as a result of a liquidation.Related Party Transaction Activity-Based Fee Percent For Distressed Whole Mortgage Loans, LiquidationActivity-based fee, percent, due to a liquidationThe activity-based fee on a related party transaction, due to the Company as a result of a deed-in-lieu of foreclosure.Related Party Transaction Activity-Based Fee For Distressed Whole Mortgage Loans, Deed-in-lieu of ForeclosureActivity-based fee due to a deed-in-lieu of foreclosureThe maximum number of liquidation fees, reperformance fees, or modification fees that can be earned during a given earnable period, as part of a related party transaction.Related Party Transaction, Maximum Number of Liquidation, Reperformance, or Modification Fees to be Earned in Earnable PeriodMaximum number of liquidation, reperformance, or modification fees that can be earned during earnable periodThe length of the earnable period during which only a maximum number of liquidation fees, reperformance fees, or modification fees can be earned for a related party transaction.Related Party Transaction Liquidation Reperformance Or Modification Fees Earnable PeriodLiquidation, reperformance, or modification fees earnable periodTransfers and Servicing of Financial Assets [Abstract]Summary of mortgage loan servicing fees earnedProperty Management Fee RevenueProperty management feesRepresents information pertaining to the management agreement.Management Fees Agreement [Member]Management AgreementRepresents information pertaining to the calculation of base management fees, tranche one, per the amended management agreement.Base Management Fee Calculation Tranche One [Member]Shareholders Equity Up To 2 Billion DollarsRepresents information pertaining to the calculation of base management fees, tranche two, per the amended management agreement.Base Management Fee Calculation Tranche Two [Member]Shareholders Equity In Excess Of 2 Billion Dollars And Upto 5 Billion DollarsRepresents information pertaining to the calculation of base management fees, tranche three, per the amended management agreement.Base Management Fee Calculation Tranche Three [Member]Shareholders Equity In Excess Of 5 Billion DollarsRepresents information pertaining to the calculation of performance incentive fees, tranche one, per the amended management agreement.Performance Incentive Fee Calculation Tranche One [Member]Return on Shareholders Equity 8 PercentRepresents information pertaining to the calculation of performance incentive fees, tranche two, per the amended management agreement.Performance Incentive Fee Calculation Tranche Two [Member]Return on Shareholders Equity 12 PercentRepresents information pertaining to the calculation of performance incentive fees, tranche three, per the amended management agreement.Performance Incentive Fee Calculation Tranche Three [Member]Return on Shareholders Equity in Excess of 16 PercentRelated Party Transaction, Percentage of Affiliate Equity Considered to Calculate Base Management FeeRelated Party Transaction, Percentage of Affiliate Equity Considered to Calculate Base Management FeeBase management fee annual rate (as a percent)Related Party Transaction, Specified Percentage Applied on Excess of Core Earnings on Rolling Quarter Basis before Incentive Fee over Hurdle Rate for Performance Incentive Fee ComputationRelated Party Transaction, Specified Percentage Applied on Excess of Core Earnings on Rolling Quarter Basis before Incentive Fee over Hurdle Rate for Performance Incentive Fee ComputationPercentage of net income for calculation of performance incentive feesRelated Party Transaction, Percentage of Return on Affiliate Equity Considered to Calculate Performance Incentive FeeRelated Party Transaction, Percentage of Return on Affiliate Equity Considered to Calculate Performance Incentive FeePercentage of return on affiliate's equityRelated Party Transaction, Threshold Shareholders Equity Considered to Calculate Base Management FeeRelated Party Transaction, Threshold Shareholders Equity Considered to Calculate Base Management FeeBase management fee shareholders' equity limitRelated Party Transaction High Watermark for Performance Incentive Fee ComputationRelated Party Transaction High Watermark for Performance Incentive Fee ComputationHigh watermarkRelated Party Transaction Percentage of Change in Net Income (Loss) for Performance Incentive Fee ComputationRelated Party Transaction Percentage of Change in Net Income (Loss) for Performance Incentive Fee ComputationPercentage of change in net income due to quarterly adjustmentsRelated Party Transaction, Percentage of Performance Incentive Fee Payable by Issuance of Common SharesRelated Party Transaction, Percentage of Performance Incentive Fee Payable by Issuance of Common SharesPercentage of performance incentive fee payable by issuance of common sharesBase revenues, as contractually stipulated, for operating and managing another entity's business during the reporting period.Management Fee Base RevenueBase management feeRevenues for operating and managing another entity's business during the reporting period which is based on meeting certain operating or revenue metrics (for example: occupancy or vacancy rates, profitability or expense targets), or otherwise meant to incentivize the operator other than by guaranteed or minimum compensation.Management Fee Incentive RevenuePerformance incentiveThe expense reimbursement amount allocated to the Company, from related party, per fiscal quarter, relating to the Company's and its affiliates personnel, not to preclude reimbursement for any other services performed by the Company or its affiliates.Related Party Transaction, Personnel Expense Reimbursement, Per Quarter AmountExpense reimbursement amount, per quarter, relating to personnelNo definition available.Related Party Transactions, Reimbursement Expenses [Abstract]Reimbursement of common overhead and expenses incurred on behalf of affiliatesReimbursement of expenses incurred as per arrangements between the reporting entity and related parties.Related Party Transactions, Reimbursement of ExpensesReimbursement of common overhead and expenses incurred by the CompanyPayments and settlements during the period as per arrangements between the reporting entity and related parties.Related Party Transactions, Payments and SettlementsPayments and settlements during the periodRepresents information pertaining to the conditional reimbursement agreement.Conditional Reimbursement Agreement [Member]Conditional ReimbursementRange [Axis]Range [Member]Range [Domain]Maximum [Member]MaximumRelated Party Transaction, Due from (to) Related Party [Abstract]Conditional reimbursementAmount of contingent reimbursement based upon satisfaction of certain performance measures over a specified period of time as per arrangements between the reporting entity and related parties.Related Party Transactions Contingent Offering Costs ReceivableConditional reimbursementThe cash inflow during the period as per arrangements between the reporting entity and related parties.Related Party Transactions Payments ReceivedPayments receivedInvestment Owned, Balance, SharesCommon shares of beneficial interest ownedThe number of subsidiaries with which the Company entered into a master repurchase agreement, pursuant to which the subsidiary may borrow from the Company for the purpose of financing participation certificates.Related Party Transaction, Number of Subsidiaries Entered into Master Repurchase AgreementNumber of subsidiaries entered into master repurchase agreementThe maximum principal balance of the variable funding note allowed, under the related party transaction.Related Party Transaction, Maximum Principal Balance of Variable Funding NoteMaximum principal balance of VFNLoans and Leases Receivable, Related Parties [Roll Forward]Repurchase agreement with PennyMac Mortgage Investment Trust:Net Cash Provided by (Used in) Investing Activities, Continuing Operations [Abstract]Activity during the year:Investments in and Advances to Affiliates, Balance [Abstract]Activity during the period:Investments in and Advances to Affiliates, Dividend or Interest Credited to IncomeDividends received from PennyMac Mortgage Investment TrustInvestments in and Advances to Affiliates, at Fair Value, Period Increase (Decrease)Change in fair value of investment in Common shares of PennyMac Mortgage Investment TrustInvestments in and Advances to Affiliates, Balance, SharesNumber of sharesLiability Class [Axis]Fair Value Liabilities Measured On Recurring Basis Unobservable Input Reconciliation By Liability Class [Domain]Fair Value by Liability Class [Domain]Represents information pertaining to excess servicing spread financing.Excess Servicing Spread Financing [Member]Excess servicing spread financingNet Cash Provided by (Used in) Financing Activities, Continuing Operations [Abstract]Financing activities:Represents the amount up to which PFSI may repay PMT in cash to settle its ESS recapture obligation in place of issuing new ESS.Excess Servicing Spread Recapture Cash Settlement AlternativeMaximum ESS recapture obligationRepresents ESS issued to related party under an agreement to replace ESS reductions arising from the Company's refinances any of the mortgage loans relating to the ESS it sells to related party, at no cost, the ESS relating to a certain percentage of the UPB of the newly originated mortgage loans.Transfer of ESS Pursuant to Recapture AgreementIssuance of Excess servicing spread payable to PennyMac Mortgage Investment Trust pursuant to a recapture agreementIssuance pursuant to recapture agreementRepresents the amount pertaining to excess servicing spread recapture recognized during the period.Excess Servicing Spread Financing Recapture RecognizedExcess servicing spread recapture recognizedNote ReceivableAmounts due from affiliateNotes payableFor an unclassified balance sheet, amounts due from related parties related to fulfillment fees.Due From Related Parties Fulfillment FeesFulfillment feesFor an unclassified balance sheet, amounts due from related parties related to management fees.Due from Related Parties, Management FeesManagement feesAmounts due from related parties related to expenses allocated to the company from an affiliate.Due from Related Parties, Allocated ExpensesAllocated expensesFor an unclassified balance sheet, amounts due from related parties related to servicing fees.Due from Related Parties, Servicing FeesServicing feesFor an unclassified balance sheet, amounts due from related parties related to correspondent lending origination fees.Due from Related Parties Correspondent Lending Origination feesCorrespondent production feesAmounts due from related parties related to contingent underwriting fees.Due from Related Parties, Contingent Underwriting FeesConditional ReimbursementAmounts due from related parties related to interest on financing receivable.Due From Related Parties, Interest on Note ReceivableInterest on assets purchased under agreements to resellDue to Related Parties [Abstract]Payable to affiliateCarrying amount as of the balance sheet date of obligations due all related parties for servicing advances.Due to Related Parties Servicing AdvancesDeposits made by PMTAmount payable to related party relating to mortgage loans subject to related party-owned MSRs refinanced by the company.Due to Related Parties M S R Recapture PayableMSR Recapture Payable to PMTCarrying amount as of the balance sheet date of obligations due all related parties for other expenses.Due to Related Parties, Other ExpensesOther expensesPercentage of tax benefits under the tax sharing agreement attributable to exchanged PennyMac unit holders.Percentage of Amount of Tax BenefitsAmount of tax benefits under the tax sharing agreement (as a percent)Represents amounts payable to PennyMac’s exchanged unitholders pursuant to an agreement under which an agreed-upon portion of the amount of the benefits, if any, that PFSI is deemed to realize as a result of (i) increases in tax basis of PennyMac’s assets resulting from such unitholders’ exchanges and (ii) certain other tax benefits related to entering into the tax receivable agreement, including tax benefits attributable to payments under the tax receivable agreement.Payable Under Tax Receivable Agreement PaymentsPayable to exchanged PNMAC unitholders under tax receivable agreementRepresent the information pertaining to cash outflow relating to tax liability under the tax receivable agreement.Payment Of Tax Liability Under The Tax Receivable AgreementPayment of tax liability under the tax receivable agreement to Private National Mortgage Acceptance Company, LLC unitholdersTable representing data pertaining to loan sales and servicing activities.Schedule of Loan Sales and Servicing Activities [Table]Loan Sales and Servicing Activities [Line Items]Loan Sales and Servicing ActivitiesCash Flows Between Transferor and Transferee [Abstract]Cash flows:Cash Flows Between Transferor and Transferee, Proceeds from New TransfersSales proceedsCash Flows Between Transferor and Transferee, Servicing FeesServicing fees receivedThe cash inflows or outflows between transferee and transferor net of advances and repayments of proceeds from servicing fee advances.Cash Flows Between Transferee And Transferor Net Advances Repayments Of Proceeds From Servicing Fee AdvancesNet recoveries of servicing advancesLoan Sales Additional Information [Abstract]Loan Sales Additional Information [Abstract]Period end information:Continuing Involvement with Transferred Financial Assets, Principal Amount OutstandingUnpaid principal balance of loans outstandingUnpaid balance of mortgage loans sold with continuing involvement delinquent thirty to eighty-nine days.Unpaid Balance Mortgage Loans Sold with Continuing Involvement Delinquent Thirty to Eighty Nine Days30-89 daysUnpaid balance of mortgage loans sold with continuing involvement delinquent ninety days or more not in foreclosure.Unpaid Balance Mortgage Loans Sold With Continuing Involvement Delinquent Ninety Days or More, Not in Foreclosure90 days or more - Not in foreclosureUnpaid balance of mortgage loans sold with continuing involvement delinquent ninety days or more in foreclosure.Unpaid Balance Mortgage Loans Sold With Continuing Involvement Delinquent Ninety Days or More, in Foreclosure90 days or more - In foreclosureUnpaid balance of mortgage loans sold with continuing involvement delinquent ninety days or more foreclosed.Unpaid Balance Mortgage Loans Sold With Continuing Involvement Delinquent Ninety Days or More, Foreclosed90 days or more - ForeclosedUnpaid balance of mortgage loans sold with continuing involvement in bankruptcy.Unpaid Balance Mortgage Loans Sold With Continuing Involvement BankruptcyBankruptcyCounterparty Name [Axis]Repurchase Agreement Counterparty Name [Domain]Counterparty Name [Domain]Represents information pertaining to agencies.Agencies [Member]Non affiliated entitiesAffiliated Entity [Member]Affiliated entitiesMortgage Servicing Portfolio [Abstract]Mortgage servicing portfolioRepresents the unpaid principal balance of mortgage loans serviced for others as the result of the company's production and sales of mortgage loans with servicing rights retained.Principal Amount Outstanding Of Loans Serviced For Others Originated ServicingOriginatedRepresents the unpaid principal balance of mortgage loans serviced for others as the result of the purchase of the related mortgage servicing rights or assumption of mortgage servicing liabilities.Principal Amount Outstanding Of Loans Serviced For Others Purchased ServicingPurchasedRepresents the unpaid principal balance of mortgage loans serviced for nonaffiliates.Principal Amount Of Loans Serviced For NonaffiliatesTotal loans serviced, excluding loans held for saleRepresents the unpaid principal balance of mortgage loans serviced for affiliates.Principal Amount Of Loans Serviced For AffiliatesAdvised entitiesThis is the principal amount outstanding for loans in portfolio which are classified as held for sale.Principal Amount Outstanding on Loans Held For SaleLoans held for salePrincipal Amount Outstanding on Loans Managed and Securitized or Asset-backed Financing ArrangementTotal loans servicedRepresents the amount of loans subserviced for the entity under mortgage servicing portfolio of the entity.Mortgage Servicing Portfolio Loans Subserviced for CompanySubserviced for the CompanyNot available.Delinquent Mortgage Loans in Portfolio [Abstract]Delinquent loans:Represents the amount of 30 days delinquent loans serviced under mortgage servicing portfolio of the entity.Mortgage Servicing Portfolio Thirty Days Delinquent Mortgage Loans30 daysRepresents the amount of 60 days delinquent loans serviced under mortgage servicing portfolio of the entity.Mortgage Servicing Portfolio Sixty Days Delinquent Mortgage Loans60 daysRepresents the amount of 90 days or more delinquent loans serviced under mortgage servicing portfolio of the entity.Mortgage Servicing Portfolio Ninety Days or More Delinquent Mortgage Loans90 days or moreRepresents the amount of 90 days or more delinquent loans serviced under mortgage servicing portfolio of the entity that are not in foreclosure.Mortgage Servicing Portfolio Ninety Days Or More Delinquent Not In Foreclosure Mortgage Loans90 days or more - Not in foreclosureRepresents the amount of 90 days or more delinquent loans serviced under mortgage servicing portfolio of the entity that are in foreclosure.Mortgage Servicing Portfolio Ninety Days Or More Delinquent Due In Foreclosure Mortgage Loans90 days or more - In foreclosureRepresents the amount of 90 days or more delinquent loans serviced under mortgage servicing portfolio of the entity that are foreclosed.Mortgage Servicing Portfolio Ninety Days Or More Delinquent Due Foreclosed Mortgage Loans90 days or more - ForeclosedDelinquent Amount at End of Period on Loans Managed and Securitized or Asset-backed Financing ArrangementTotal delinquent mortgage loansRepresents the amount of loans serviced under mortgage servicing portfolio of the entity that are in bankruptcy.Mortgage Servicing Portfolio, Loans Managed and Securitized, BankruptcyBankruptcyCarrying amount of the funds held on behalf of others relating to loans serviced under servicing agreements which are not recognized in the financial statements (off-balance sheet).Custodial BalancesCustodial funds managed by the CompanyGeographical [Axis]Segment Geographical [Domain]Geographical [Domain]C [A]CaliforniaF [L]FloridaT [X]TexasV [A]VirginiaRepresents information pertaining to all other states.All Other States [Member]All other statesFair Value Measurements, Recurring and Nonrecurring [Table]Measurement Frequency [Axis]Fair Value Measurement Frequency [Domain]Fair Value, Measurement Frequency [Domain]Fair Value Measurements Recurring [Member]Recurring basisFair Value, Hierarchy [Axis]Fair Value Measurements Fair Value Hierarchy [Domain]Fair Value Hierarchy [Domain]Fair Value Inputs Level1 [Member]Level 1Fair Value Inputs Level2 [Member]Level 2Fair Value Inputs Level3 [Member]Level 3Derivative Instrument [Axis]Derivative Contract Type [Domain]Derivative Contract [Domain]Forward Contracts [Member]Forward contractsPut Option [Member]MBS put optionsCall Option [Member]MBS call optionsRepresents information pertaining to the call option on interest rate futures.Call Option On Interest Rate Futures [Member]Call options on interest rate futuresPosition [Axis]Position [Domain]Position [Domain]Long [Member]PurchasesShort [Member]SalesFair Value, Assets and Liabilities Measured on Recurring and Nonrecurring Basis [Line Items]Fair valueFinancial statement items measured at fair value on a nonrecurring basisAssets, Fair Value Disclosure [Abstract]Assets:Derivative Asset [Abstract]TotalDerivative assets:Fair value before effects of master netting arrangements, of a financial asset or other contract with one or more underlying, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes assets not subject to a master netting arrangement and not elected to be offset.Derivative Assets, Including Assets Not Subject to Master Netting Arrangement GrossGross amounts of recognized assetsDerivative asset, before nettingFair value of liability associated with financial asset or other contract with one or more underlying, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, and the amount of obligation to return the cash collateral under a master netting arrangements, offset against derivative assets.Derivative Asset, Gross Amounts Offset under Master Netting ArrangementNettingGross amounts offset in the consolidated balance sheetAssets, Fair Value Disclosure, NonrecurringTotal assetsLiabilities, Fair Value Disclosure [Abstract]Liabilities:TotalDerivative liabilities:Represents the amount of excess servicing spread financing liability at fair value.Excess Servicing Spread Financing LiabilityExcess servicing spread financing at fair value to affiliateFair value before effects of master netting arrangements, of a financial liability or contract with one or more underlying, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset. Includes liabilities not subject to a master netting arrangement and not elected to be offset.Derivative Liabilities, Including Liabilities Not Subject to Master Netting Arrangement GrossDerivative liability, before nettingGross amounts of recognized liabilitiesFair value of asset associated with financial liability or contract with one or more underlying, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, and the amount of right to receive the cash collateral under a master netting arrangements, offset against derivative liabilities.Derivative Liability, Gross Amounts Offset under Master Netting ArrangementNettingLiabilities, Fair Value Disclosure, RecurringTotal liabilitiesFair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Table]Represents information pertaining to the mortgage servicing rights.Mortgage Servicing Rights [Member]Mortgage servicing rightsRepresents information pertaining to the mortgage servicing liabilities.Mortgage Servicing Liabilities [Member]Mortgage servicing liabilitiesFair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation [Line Items]Roll forward of items measured using Level 3 inputs on a recurring basisFair Value, Assets Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]Roll forward of assets measured using Level 3 inputs on a recurring basisFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset ValueBalance at the end of the periodBalance at the beginning of the periodFair value of financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing that were reclassified due to change in accounting principle.Fair Value Measurement With Unobservable Inputs Reconciliation Reclassification Recurring Basis Asset ValueReclassification of mortgage servicing rights previously accounted for under the amortization methodFair value of financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing, adjusted.Fair Value Measurement With Unobservable Inputs Reconciliation Recurring Basis Asset Value AdjustedBalance after reclassificationFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, PurchasesPurchasesAmount of purchases and issuances net of financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement With Unobservable Inputs Reconciliation Recurring Basis Asset Purchases And Issuances NetPurchases and issuances, netAmount of sales and repayments on financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement With Unobservable Inputs Reconciliation Recurring Basis Asset Sales And RepaymentsSales and repaymentsThe value of new servicing assets, subsequently measured at fair value, acquired or created during the current period through loan sales.Servicing Asset at Fair Value Additions from Loan SalesAmount recognizedMortgage servicing rights resulting from loan salesAdditions - Mortgage servicing rights resulting from loan salesFair Value, Assets and Liabilities Measured on Recurring Basis, Gain (Loss) Included in Earnings [Abstract]Changes in fair value included in income arising from:Represents the amount of gain (loss) recognized in the income statement, arising from changes in instrument specific credit risk, for financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement With Unobservable Inputs Reconciliation Recurring Basis Asset Changes In Instrument Specific Credit Risk Included In EarningsChanges in instrument specific credit riskRepresents the amount of gain (loss) recognized in the income statement, arising from other factors, for financial instrument classified as an asset measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement with Unobservable Inputs Reconciliation Recurring Basis Asset Other Factors Included in EarningsOther factorsFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Gain (Loss) Included in EarningsTotal changes in fair value included in incomeFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Asset, Transfers out of Level 3Transfers from mortgage loans held for sale from Level 3 to Level 2Amount of transfers of financial instrument classified as an asset to real estate acquired in settlement of loans.Fair Value Measurement With Unobservable Inputs Reconciliation Recurring Basis Asset Transfers To Real Estate Acquired In Settlement Of LoansTransfers to real estate acquired in settlement of loansTransfer of interest rate lock commitment to mortgage loan measured using Level 2 inputs as a result of funding or purchase of the loan subject to the rate lock commitment.Fair Value Measurement With Unobservable Inputs Reconciliation Recurring Basis Asset Transfer to Mortgage Loans Held For Sale Due to Loan Funding Or PurchaseTransfers from interest rate lock commitments to loans held for saleFair Value, Assets Measured on Recurring Basis, Change in Unrealized Gain (Loss)Changes in fair value recognized during the period relating to assets still held at the end of the periodFair Value, Liabilities Measured on Recurring Basis, Unobservable Input Reconciliation, Calculation [Roll Forward]Roll forward of liabilities measured using Level 3 inputs on a recurring basisFair Value, Measurement with Unobservable Inputs Reconciliations, Recurring Basis, Liability ValueBalance at the end of the periodBalance at the beginning of the periodFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, IssuancesIssuancesAccrual of interest of financial instrument classified as a liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement with Unobservable Inputs Reconciliation Recurring Basis Liability Accrual of InterestAccrual of interest on excess servicing spread financingAccrual of interestAmount of repayments on financial instrument classified as an liability measured using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement with Unobservable Inputs Reconciliation Recurring basis Liability RepaymentsRepaymentRepresents the accrual of mortgage servicing liability as proceeds from sales of loans.Accrual Of Mortgage Servicing Liability As Proceeds From Sales Of LoansMortgage servicing liabilities resulting from loan salesFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Period Increase (Decrease)Changes in fair value recognized during the period relating to liability still outstanding at the end of the periodFair Value, Option, Quantitative Disclosures [Table]Assets [Member]AssetsRepresents information pertaining to the mortgage servicing rights.Servicing Asset At Fair Value Amount [Member]Mortgage servicing rights at fair valueLiability [Member]Liabilities.Income Statement Location [Axis]Income Statement Location [Domain]Income Statement Location [Domain]Primary financial statement caption encompassing net gains on mortgage loans held for sale at fair value.Net Gains On Mortgage Loans Held For Sale At Fair Value [Member]Net gains on loans held for sale at fair valuePrimary financial statement caption in which reported facts about income related to net servicing fees has been included.Servicing Fees Net [Member]Net loan servicing feesFair Value, Option, Quantitative Disclosures [Line Items]Net gains (losses) from changes in estimated fair values included in earnings for financial statement items carried at estimated fair valueFair value and related principal amounts due upon maturity of assets and liabilities accounted for under the fair value optionFair Value, Option, Changes in Fair Value, Gain (Loss)Total gains (losses) from changes in estimated fair values included in earningsFinancial Instrument [Axis]Transfers And Servicing Of Financial Instruments Types Of Financial Instruments [Domain]Financial Instruments [Domain]Fair Value, Option, Loans Held as Assets [Abstract]Fair valueRepresents the aggregate fair value of loans held as assets that are less than 90 days past due for which the fair value option has been elected.Fair Value Option Loans Held as Assets Less than 90 Days Past DueCurrent through 89 days delinquentThis item represents the aggregate fair value of loans held as assets that are 90 plus days delinquent, but are not in foreclosure for which the fair value option has been elected.Fair Value of Mortgage Loans Held As Assets 90 Plus Days Delinquent Not in ForeclosureNot in foreclosureThis item represents the aggregate fair value of loans held as assets that are 90 plus days delinquent and are in foreclosure for which the fair value option has been elected.Fair Value of Mortgage Loans Held As Assets 90 Plus Days Delinquent in ForeclosureIn foreclosureFair Value Option Loans Held as Assets Principal Amount Due upon Maturity [Abstract]Principal amount due upon maturityRepresents the principal amount of loans held as assets upon maturity of less than 90 days past due for which the fair value option has been elected.Fair Value Option Loans Held as Assets Principal Amount upon Maturity of Less than 90 Days Past DueCurrent through 89 days delinquentRepresents the principal amount of loans held as assets, 90 days past due, that are not in foreclosure for which the fair value option has been elected.Fair Value Option Loans Held As Assets 90 Plus Days Past Due Not in Foreclosure Principal Amount Due Upon MaturityNot in foreclosureRepresents the principal amount of loans held as assets, 90 days past due, that are in foreclosure for which the fair value option has been elected.Fair Value Option Loans Held As Assets 90 Plus Days Past Due in Foreclosure Principal Amount Due Upon MaturityIn foreclosureMortgage Loans on Real Estate, Principal Amount of Delinquent LoansTotal principal amount due upon maturityFair Value, Option, Loans Held as Assets, Aggregate Difference [Abstract]DifferenceFor loans held as assets for which the fair value option has been elected, this item represents the difference between the aggregate fair value and the aggregate unpaid principal balance of those loans that are less than 90 days past due.Fair Value Option Loans Held as Assets Less than 90 Days Past Due Aggregate, DifferenceCurrent through 89 days delinquentFor loans held as assets, for which the fair value option has been elected, this item represents the difference between the aggregate fair value and the aggregate unpaid principal balance of those loans that are 90 days past due and not in foreclosure.Fair Value Option Loans Held As Assets 90 Plus Days Past Due Not in Foreclosure Aggregate DifferenceNot in foreclosureFor loans held as assets for which the fair value option has been elected, this item represents the difference between the aggregate fair value and the aggregate unpaid principal balance of those loans that are 90 days past due and in foreclosure.Fair Value Option Loans Held As Assets 90 Plus Days Past Due in Foreclosure Aggregate DifferenceIn foreclosureFor loans held as assets for which the fair value option has been elected, this item represents the difference between the aggregate fair value and the aggregate unpaid principal balance of those loans which are past due.Fair Value Option Loans Held as Assets Past Due Aggregate DifferenceTotal differenceFair Value Measurements Nonrecurring [Member]Nonrecurring basisRepresents the period-end balance of the portion of real estate acquired in settlement of loans that was remeasured based on fair value during the period.Real Estate Acquired in Settlement of Loans Measured at Fair Value During the PeriodReal estate acquired in settlement of loansFair Value Assets and Liabilities Measured on Nonrecurring Basis Gain (Loss) Included in Earnings [Abstract]Total gains (losses) on assets measured at estimated fair values on a nonrecurring basisAmount of gain (loss) recognized in the income statement for financial instrument classified as real estate acquired in settlement of loans measured on a nonrecurring basis using unobservable inputs that reflect the entity's own assumption about the assumptions market participants would use in pricing.Fair Value Measurement With Unobservable Inputs, Reconciliation Nonrecurring Basis, Gain (Loss) from Real Estate Acquired in Settlement of LoansReal estate acquired in settlement of loansFair Value Measurements, Recurring and Nonrecurring, Valuation Techniques [Table]Minimum [Member]MinimumWeighted Average [Member]Weighted averageFair Value Measurements, Recurring and Nonrecurring, Valuation Techniques [Line Items]Excess servicing spread financingLoans Held-for-sale, Measurement InputInputDebt Securities, Available-for-sale, Measurement InputInputThe repurchase agreement derivatives percentage of approval of mortgage loans financed under the master repurchase agreement.Fair Value Inputs Repurchase Agreement Derivatives Component Percentage Of Approval Rate Of Mortgage Loans Financed Under Master Repurchase AgreementAcceptance rate (as a percent)Schedule of Assumptions for Fair Value as of Balance Sheet Date of Assets or Liabilities that relate to Transferor's Continuing Involvement [Table]Assumption for Fair Value as of Balance Sheet Date of Assets or Liabilities that relate to Transferor's Continuing Involvement [Line Items]InputsThe amount of servicing asset additions from Loan sales.Servicing Asset Additions From Loan SalesAmount recognizedRepresents the amount of unpaid principal balance of mortgage loans underlying mortgage servicing rights recognized pursuant to loan sales during the period.Assumption for Fair Value Unpaid Principal Balance of Underlying LoansUnpaid principal balance of underlying loansWeighted-average servicing fee rate on financial assets of a securitization, asset-backed financing arrangement, or similar transfer regardless of when the transfer occurred.Assumption for Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Weighted Average Servicing Fee RateWeighted-average servicing fee rate (as a percent)No definition availableInputs AbstractInputs:Servicing Asset, Measurement InputInputRepresents the cost of servicing per loan, used to estimate the amount of mortgage servicing rights to recognize at the date of sale of the underlying mortgage loans.Assumption for Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Per Loan Cost of ServicingAnnual per-loan cost of servicingSchedule of Sensitivity Analysis of Fair Value, Transferor's Interests in Transferred Financial Assets [Table]Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor, Servicing Assets or Liabilities, Impact of Adverse Change in Assumption [Line Items]No definition available.Msr and Pool Characteristics [Abstract]MSR and pool characteristicsRepresents the servicing asset unpaid principal balance of underlying loans.Servicing Asset Unpaid Principal Balance Of Underlying LoansUnpaid principal balance of underlying loansWeighted-average note rate on servicing assets.Servicing Asset Weighted Average Note RateWeighted-average note interest rate (as a percent)Weighted-average servicing fee rate on servicing assets.Servicing Asset Weighted Average Service Fee RateWeighted-average servicing fee rate (as a percent)Fair Value Inputs [Abstract]InputsNo definition available.Pricing Spread [Abstract]Pricing spreadThe hypothetical financial impact of a specified adverse percentage change in pricing spread on the fair value of transferor's interests in transferred financial assets (including any servicing assets or servicing liabilities) as of the balance sheet date.Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Impact of Other than 10 or 20 Percent Adverse Change in Pricing SpreadEffect on fair value of 5% adverse changeThe hypothetical financial impact of a 10 percent adverse change of pricing spread on the fair value of transferor's interests in transferred financial assets (including any servicing assets or servicing liabilities) as of the balance sheet date.Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Impact of 10 Percent Adverse Change in Pricing SpreadEffect on fair value of 10% adverse changeThe hypothetical financial impact of a 20 percent adverse change of pricing spread on the fair value of transferor's interests in transferred financial assets (including any servicing assets or servicing liabilities) as of the balance sheet date.Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Impact of 20 Percent Adverse Change in Pricing SpreadEffect on fair value of 20% adverse changeNo definition available.Prepayment Speed AbstractPrepayment speedSensitivity Analysis of Fair Value, Transferor's Interests in Transferred Financial Assets, Impact of Other than 10 or 20 Percent Adverse Change in Prepayment SpeedEffect on fair value of 5% adverse changeSensitivity Analysis of Fair Value, Transferor's Interests in Transferred Financial Assets, Impact of 10 Percent Adverse Change in Prepayment SpeedEffect on fair value of 10% adverse changeSensitivity Analysis of Fair Value, Transferor's Interests in Transferred Financial Assets, Impact of 20 Percent Adverse Change in Prepayment SpeedEffect on fair value of 20% adverse changeNo definition available.Per Loan Annual Cost Of Servicing AbstractAnnual per-loan cost of servicingThe hypothetical financial impact of a specified adverse percentage change in cost of servicing on the fair value of transferor's interests in transferred financial assets (including any servicing assets or servicing liabilities) as of the balance sheet date.Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Impact of Other than 10 or 20 Percent Adverse Change in Cost of ServicingEffect on fair value of 5% adverse changeThe hypothetical financial impact of a 10 percent adverse change of cost of servicing on the fair value of transferor's interests in transferred financial assets (including any servicing assets or servicing liabilities) as of the balance sheet date.Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Impact of 10 Percent Adverse Change in Cost of ServicingEffect on fair value of 10% adverse changeThe hypothetical financial impact of a 20 percent adverse change of cost of servicing on the fair value of transferor's interests in transferred financial assets (including any servicing assets or servicing liabilities) as of the balance sheet date.Sensitivity Analysis of Fair Value of Interests Continued to be Held by Transferor Servicing Assets or Liabilities Impact of 20 Percent Adverse Change in Cost of ServicingEffect on fair value of 20% adverse changeRepresents the excess servicing spread financing unpaid principal balance of underlying mortgage loans.Excess Servicing Spread Financing Unpaid Principal Balance Of Underlying Mortgage LoansUnpaid principal balance of underlying mortgage loansExcess servicing spread on average servicing fee rate of underlying mortgage loans.Excess Servicing Spread Financing Average Servicing Fee Rate Of Underlying Mortgage LoansAverage servicing fee rate (as a percent)Average excess servicing spread on financial assets of a securitization, asset-backed financing arrangement, or similar transfer regardless of when the transfer occurred.Excess Servicing Spread Financing Average Excess Servicing Spread RateAverage excess servicing spread (as a percent)Value of input used to measure investment in excess servicing spread financing measured at fair value.Excess Servicing Spread Financing Measurement InputInputUnpaid principal balance of mortgage loans underlying fair value of servicing liability.Servicing Liability Unpaid Principal Balance Of Underlying LoansUnpaid principal balance of underlying loansServicing fee rate relating to mortgage loans underlying servicing liability.Servicing Liability Servicing Fee Rate Of Underlying LoansServicing fee rate (as a percent)Servicing Liability, Measurement InputInputTabular disclosure of information about mortgage loans held for sale, information may be provided for each individual mortgage loan or groups of mortgage loans.Mortgages Held For Sale [Table]Mortgage Loans on Real Estate, Loan Type [Axis]Mortgage Loans On Real Estate Loan Type [Domain]Mortgage Loans on Real Estate, Loan Type [Domain]Represents information pertaining to mortgage loan which are government-insured or guaranteed.Government Insured Or Guaranteed Loan [Member]Government-insured or guaranteedConventional Loan [Member]Conventional mortgage loansRepresents information related to jumbo loans.Jumbo Loan [Member]Jumbo LoanRepresents information related to home equity lines of credit.Home Equity Lines Of Credit [Member]Home equity lines of creditRepresents information pertaining to mortgage loans purchased from Ginnie Mae pools serviced by the entity.Mortgage Loans On Real Estate Purchased From Ginnie Mae Pools Serviced By Entity [Member]Mortgage loans purchased from Ginnie Mae pools serviced by the entityRepresents information pertaining to mortgage loans repurchased pursuant to the Company's obligations under representations and warranties made as part of the sale of such mortgage loans.Repurchased Loans [Member]Mortgage loans repurchased pursuant to representations and warrantiesLine items represent financial concepts included in a table. These concepts are used to disclose reportable information associated with domain members defined in one or many axes to the table.Mortgages Held For Sale [Line Items]Mortgage Loans Held for Sale at Fair ValuePledged Financial Instruments, Not Separately Reported, Loans Receivable Pledged as CollateralFair value of loans pledged to secure assets sold under agreements to repurchaseThe sum of the carrying amounts, as of the date of the latest financial statement presented, of loans receivable which are owned but transferred to serve as collateral for the payment of related debt obligations, and for which the transferees are not permitted to sell or re-pledge them to an unrelated party.Pledged Financial Instruments Not Separately Reported Loans Receivable Pledged As Collateral for Participating and Sale AgreementFair value of loans pledged to secureFair value of loans pledged to secure mortgage loan participation and sale agreementDerivative [Table]Hedging Designation [Axis]Hedging Designation [Domain]Hedging Designation [Domain]Nondesignated [Member]Not designated as hedging instrumentMargin deposits member.Margin Deposits [Member]Margin DepositsRepresents information pertaining to the put option on interest rate futures.Put Option On Interest Rate Futures [Member]Put options on interest rate futuresFuture [Member]Treasury futureDerivative [Line Items]Derivative InstrumentsDerivative, Notional AmountBalance at end of periodBalance at beginning of periodNotional amountMargin Deposit AssetsMargin deposits placed with counterpartiesMargin deposit assetsRepresents the margin deposit assets or liabilities.Margin ​Deposit​ Assets ​LiabilitiesDeposits placed with (collateral received from) derivative counterpartiesA roll forward is a reconciliation of a concept from the beginning of a period to the end of a period.Derivative Notional Amount [Roll Forward]Activity for derivative contracts used to hedge the IRLCs and inventory of mortgage loans at notional valueAmount of increase in aggregate notional amount specified by the derivative(s).Derivative Acquired During Period Notional AmountAdditionsAmount of dispositions or expirations out of aggregate notional amount specified by the derivative(s).Derivative Dispositions or Expirations During Period Notional AmountDispositions/expirationsDerivative, Gain (Loss) on Derivative, NetGains (losses) recognized on derivative financial instrumentsOffsetting Assets [Table]Offsetting Assets [Line Items]Offsetting of derivative assets, financial assets and collateral held by counterpartyn/aDerivative Asset, Not Subject to Master Netting Arrangement [Abstract]Derivatives not subject to master netting arrangementsDerivative Asset, Not Subject to Master Netting ArrangementGross amounts of recognized assetsDerivative Asset, Fair Value, Amount Not Offset Against Collateral [Abstract]Derivatives subject to master netting arrangements:Derivative Asset, Fair Value, Gross AssetGross amounts of recognized assetsFair value of financial asset or other contract with one or more underlying, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, subject to a master netting arrangement.Derivative Assets Net of Master Netting ArrangementNet amounts of assets presented in the consolidated balance sheetDerivative Asset, Fair Value, Amount Offset Against CollateralNet amountOffsetting Liabilities [Table]Offsetting Liabilities [Line Items]Offsetting of derivative liabilities, financial liabilities and collateral held by counterpartyn/aDerivative Liability, Not Subject to Master Netting Arrangement [Abstract]Derivatives not subject to master netting arrangementsDerivative Liability, Not Subject to Master Netting ArrangementGross amounts of recognized liabilitiesDerivative Liability, Fair Value, Amount Not Offset Against Collateral [Abstract]Derivatives: Subject to master netting arrangements:Derivative Liability, Fair Value, Gross LiabilityGross amounts of recognized liabilitiesFair value of financial liability or contract with one or more underlying, notional amount or payment provision or both, and the contract can be net settled by means outside the contract or delivery of an asset, subject to a master netting arrangement.Derivative Liabilities Net of Master Netting ArrangementNet amounts of liabilities presented in the balance sheetOffsetting Securities Sold under Agreements to Resell [Abstract]Mortgage loans sold under agreements to repurchaseSecurities Sold under Agreements to Repurchase, GrossGross amounts of recognized liabilitiesSecurities Sold under Agreements to RepurchaseNet amounts of liabilities presented in the consolidated balance sheetUnpaid principal balance of assets sold under agreements to repurchase.Assets Sold Under Agreements To Repurchase Unpaid Principal BalanceUnpaid principal balanceNet amounts of liabilities presented in the consolidated balance sheetUnpaid principal balanceDeferred Finance Costs, Net [Abstract]Debt Issuance CostsDebt Instrument, Unamortized Discount (Premium) and Debt Issuance Costs, NetUnamortized debt issuance costs and premiumsDebt issuance costs, grossAmount, after accumulated amortization, of debt issuance costs. Includes, but is not limited to, legal, accounting, underwriting, printing, and registration cost.Net Deferred Finance Costs NetDebt issuance costsGross amount, after the effects of master netting arrangements, of funds outstanding borrowed in the form of a security repurchase agreement between the entity and another party for the sale and repurchase of identical or substantially the same securities at a date certain for a specified price net of debt issuance costs. Includes liabilities not subject to a master netting arrangement and not elected to be offset.Securities Sold Under Agreements to Repurchase Net of Debt Issuance Costs, GrossGross amounts of recognized liabilitiesOffsetting Derivative Liability, Securities Sold under Agreements to Resell, Securities Loaned [Abstract]TotalDerivative Liability, Securities Sold under Agreements to Resell, Securities Loaned, GrossGross amounts of recognized liabilitiesDerivative Liability, Securities Sold under Agreements to Resell, Securities Loaned, AssetGross amounts offset in the consolidated balance sheetDerivative Liability, Securities Sold under Agreements to Resell, Securities LoanedNet amounts of liabilities presented in the consolidated balance sheetNet amounts of liabilities presented in the consolidated balance sheetDerivative Liability, Securities Sold under Agreements to Resell, Securities Loaned, Amount Offset Against CollateralNet amount of liabilities in the consolidated balance sheetDerivative Liability, Securities Sold under Agreements to Resell, Securities Loaned, Collateral, Right to Reclaim SecuritiesFinancial instrumentsSchedule of Servicing Assets at Fair Value [Table]Servicing Assets at Fair Value [Line Items]Activity in MSRs carried at fair valueServicing Asset at Fair Value, Amount [Roll Forward]Activity in MSRs carried at fair valueThe value of new servicing assets, subsequently measured at fair value, acquired or created during the current period through mortgage servicing rights purchases.Servicing Asset At Fair Value Additions From PurchasesAdditions - PurchasesServicing Asset at Fair Value, AdditionsAdditionsServicing Asset at Fair Value Changes in Fair Value [Abstract]Change in fair value:Servicing Asset at Fair Value, Changes in Fair Value Resulting from Changes in Valuation Inputs or Changes in AssumptionsChanges in inputs used in valuation modelServicing Asset at Fair Value, Other Changes in Fair ValueOther changes in fair valueServicing Asset at Fair Value, Period Increase (Decrease)Total change in fair valueThe fair value, as of the date of each statement of financial position presented, of servicing assets that are restricted as collateral, and that are reclassified and separately reported in the statement of financial position because the transferee has the right by contract or custom to sell or re-pledge them.Pledged Assets Separately Reported Servicing Asset Carried At Fair Value PledgedTotalServicing Liability at Amortized Cost [Table]Servicing Liability at Amortized Cost [Line Items]Servicing Liability at Amortized Cost [Roll Forward]Amortized cost:Servicing Liability at Fair Value, AmountBalance at end of periodBalance at beginning of periodServicing Liability at Fair Value, Changes in Fair Value Resulting from Changes in Valuation Inputs or Changes in AssumptionsChanges in valuation inputs used in valuation modelServicing Liability at Fair Value, Other Changes in Fair ValueOther changes in fair valueServicing Liability at Fair Value, Period Increase (Decrease)Total change in fair valueN/ALate Fees and Ancillary Fees Earned in Exchange for Servicing Financial Assets [Abstract]Ancillary and other feesLate Fee Income Generated by Servicing Financial Assets, AmountLate chargesLessee, Lease, Description [Table]Lessee, Lease, Description [Line Items]LeasesRepresents operating lease remaining lease term.Lessee Operating Lease Remaining Lease TermRemaining operating lease termLessee, Operating Lease, Existence of Option to Extend [true false]Operating lease option to extendLessee, Operating Lease, Renewal TermOperating lease renewal termLease, Cost [Abstract]Lease expenses:Operating Lease, CostOperating leasesShort-term Lease, CostShort-term leasesSublease IncomeSublease incomeLease, CostTotal lease costOperating Lease, PaymentsCash payments for operating leasesOperating Lease, Weighted Average Remaining Lease TermRemaining lease term (in year)Operating Lease, Weighted Average Discount Rate, PercentDiscount rate (as a percent)Operating Lease Liabilities, Payments Due [Abstract]Operating lease liabilitiesLessee, Operating Lease, Liability, Payments, Due Next Rolling Twelve Months2020Lessee, Operating Lease, Liability, Payments, Due in Rolling Year Two2021Lessee, Operating Lease, Liability, Payments, Due in Rolling Year Three2022Lessee, Operating Lease, Liability, Payments, Due in Rolling Year Four2023Lessee, Operating Lease, Liability, Payments, Due in Rolling Year Five2024Lessee, Operating Lease, Liability, Payments, Due after Rolling Year FiveThereafterLessee, Operating Lease, Liability, Payments, DueTotal lease paymentsLessee, Operating Lease, Liability, Undiscounted Excess AmountLess imputed interestRepresents the number of operating leases not yet commenced.Operating Lease Number Not Yet CommencedNumber of operating leases not yet commenced.Represents the amount of operating lease expense from leases not yet commenced.Operating Lease Lease Not Yet Commenced ExpenseLease expense from leases not yet commencedSchedule of Short-term Debt [Table]Short-term Debt [Line Items]Short-term debtMortgage loans sold under agreement to repurchaseDuring the period:During the period:Average balanceAverage balance of mortgage loans sold under agreements to repurchaseShort-term Debt, Weighted Average Interest Rate, over TimeWeighted-average interest rate (as a percent)Repurchase Agreements, Interest Expense AmountAssets sold under agreements to repurchaseTotal interest expenseShort-term Debt, Maximum Amount Outstanding During PeriodMaximum daily amount outstandingMaximum daily amount outstandingMortgage Loans Acquired for Sale Sold under Agreements to Repurchase at Period End [Abstract]Carrying value:Short-term Debt, Weighted Average Interest RateWeighted average interest rate (as a percent)Committed amount of borrowing capacity currently available under the credit facility (current borrowing capacity less the amount of borrowings outstanding).Line Of Credit Facility Remaining Borrowing Capacity CommittedAvailable borrowing capacity committedUncommitted amount of borrowing capacity currently available under the credit facility (current borrowing capacity less the amount of borrowings outstanding).Line Of Credit Facility Remaining Borrowing Capacity UncommittedAvailable borrowing capacity uncommittedLine of Credit Facility, Remaining Borrowing CapacityUnused amountAvailable borrowing capacityPledged Assets Separately Reported, Securities Pledged as Collateral, at Fair ValueFair value of assets pledged to secureAmortization of Debt Discount (Premium)Amortization of premiumAmortization of Financing CostsAmortization of debt issuance costsAmount of Master Repurchase Agreement incentives to refinance.Amount Of Master Repurchase Agreement Incentives To RefinanceAmount of Master Repurchase Agreement incentives to refinance include in interest expenseSecurities or Other Assets Sold under Agreements to Repurchase, Maturity Periods [Axis]Assets Sold Under Agreements To Repurchase Maturity Period [Domain]Assets Sold under Agreements to Repurchase, Maturity Period [Domain]Maturity Up To30 Days [Member]Within 30 daysMaturity30 To90 Days [Member]Over 30 to 90 daysMaturity period that is more than 90 days but fewer than 181 days from the reporting date for repurchase agreements and similar transactions, for example, but not limited to, securities lending arrangements.Maturity Over90 Days To180 Days [Member]Over 90 to 180 daysMaturity period that is more than 179 days but fewer than 1 year from the reporting date for repurchase agreements and similar transactions, for example, but not limited to, securities lending arrangements.Maturity Over180 Days To One Year [Member]Over 180 days to one yearRepurchase Agreement Counterparty, Weighted Average Maturity of AgreementsWeighted-average maturity (in months)Represents information pertaining to Credit Suisse First Boston Mortgage Capital LLC.Credit Suisse First Boston Mortgage Capital L L C [Member]Credit Suisse First Boston Mortgage Capital LLCRepresents information pertaining to Credit Suisse First Boston Mortgage Capital LLC, tranche two of repurchase agreements.Credit Suisse First Boston Mortgage Capital L L C Tranche Two [Member]Credit Suisse First Boston Mortgage Capital LLC Tranche TwoRepresents information pertaining to Credit Suisse First Boston Mortgage Capital LLC, tranche one of repurchase agreements.Credit Suisse First Boston Mortgage Capital L L C Tranche One [Member]Credit Suisse First Boston Mortgage Capital LLC Tranche OneRepresents information pertaining to Bank of America.Bank Of America [Member]Bank of America, N.A.Represents information pertaining to Morgan Stanley Bank.Morgan Stanley Bank [Member]Morgan Stanley BankRepresents information pertaining to Citibank, N.A.Citibank N [Member]Citibank, N.A.Repurchase Agreement Counterparty, Amount at RiskAmount at riskRepresents the interest expense related to mortgage loans participation and sale agreement.Interest Expense Mortgage Loan Participation And Sale AgreementMortgage loan participation purchase and sale agreementsTotal interest expenseNotes Payable at Period End [Abstract]Carrying value:Amount of unpaid principal balance of mortgage loan participation and sale agreementMortgage Loan Participation And Sale Agreement Unpaid Principal BalanceUnpaid principal balance of mortgage loan participation and sale agreement secured by mortgage loan participation certificatesUnamortized Debt Issuance ExpenseUnamortized issuance costsParticipation certificates in mortgage loans that have been pooled with Fannie Mae, Freddie Mac or Ginnie Mae, are issued to a lender pending the securitization of the mortgage loans and sales of the resulting securities.Mortgage Loan Participation And Sale AgreementsMortgage loan participation and sale agreement secured by mortgage loan participation certificatesDebt Instrument [Axis]Debt Instrument Name [Domain]Debt Instrument, Name [Domain]Notes Payable Other Payables [Member]Note PayableRepresents information pertaining to the servicing advances.Servicing Advances [Member]Servicing advancesLine of Credit Facility, Maximum Borrowing CapacityMaximum loan amountWeighted-average interest rate (as a percent)Represents the interest expense incurred during the reporting period on notes payable.Interest Expense Notes PayablesNotes payableTotal interest expenseThe maximum daily notes payable amount outstanding during the reporting period.Notes Payable, Maximum Daily Amount OutstandingMaximum daily amount outstandingRepresents the unpaid principal balance of notes payable, as of the balance sheet date.Notes Payable, Unpaid Principal BalanceUnpaid principal balanceDebt, Weighted Average Interest RateWeighted-average interest rate (as a percent)Amount of borrowing capacity currently available under the notes payable (current borrowing capacity less the amount of borrowings outstanding).Notes Payable, Remaining Borrowing CapacityUnused amountPledged Financial Instruments, Not Separately Reported, SecuritiesAssets pledged to secureDebt Instrument, Face AmountMaximum loan amountDebt Instrument, Description of Variable Rate BasisDescription of variable rateDebt Instrument, Basis Spread on Variable RateInterest rate spreadWrite off of Deferred Debt Issuance CostDebt issuance costsThe average carrying amount of obligations under capital lease.Capital Lease Obligations, Average BalanceAverage balanceWeighted average interest rate of obligations under capital lease, during the period.Weighted Average Interest Rate of Obligations Under Capital Lease During PeriodWeighted average interest rateFinance Lease, Interest ExpenseObligations under capital leaseTotal interest expenseThe maximum daily amount outstanding under capital lease.Capital Lease Obligations, Maximum Daily Amount OutstandingMaximum daily amount outstandingWeighted average interest rate of obligations under capital lease.Weighted Average Interest Rate of Obligations Under Capital LeaseWeighted average interest rateFair Value, Measurement with Unobservable Inputs Reconciliation, Recurring Basis, Liability, Purchases, (Sales), Issuances, (Settlements) [Abstract]Issuances of excess servicing spread to PennyMac Mortgage Investment Trust:Representations and Warranties Liability Activity During Period [Abstract]During the year:Represents the provisions for representations and warranties losses pursuant to mortgage loan sales.Provisions for Representations and Warranties, Losses Pursuant to Mortgage Loan SalesProvision for losses relating to representations and warranties on loans sold pursuant to loan salesProvision for losses on loans sold resulting from sales of loansRepresents the adjustment to previously recorded provisions for representations and warranties losses, due to change in estimate.Provisions for Representations and Warranties, Losses, Adjustment to Previously Recorded Amount, Change in EstimateProvision for losses on loans sold reduction in liability due to change in estimateProvision for losses relating to representations and warranties on loans sold reduction in liability due to change in estimateRepresents losses charged against the liability for representations and warranties relating to mortgage loans repurchased or losses reimbursed to mortgage loan purchasers due to the Company's breach of representations and warranties made as part of the sale of such loans.Representations and Warranties Losses IncurredIncurred losses, netAmount of unpaid principal balance of mortgage loans subject to representations and warranties.Mortgage Loans Subject To Representations And Warranties Unpaid BalanceUnpaid principal balance of loans subject to representations and warranties at end of quarterReconciliation of the entity's provision for income taxes at statutory rates to the provision for income taxes at the entity's effective tax rateEffective Income Tax Rate Reconciliation, PercentEffective tax rate (as a percent)Loss Contingencies [Table]Loss Contingencies [Line Items]ContingenciesAmount to be expended to satisfy the terms of arrangements in which the entity has agreed to expend to purchase and fund mortgage loans.Commitments to Purchase and Fund Mortgage LoansTotal commitments to purchase and fund mortgage loansClass of Treasury Stock [Table]Equity, Class of Treasury Stock [Line Items]Stockholders' EquityStock Repurchase Program, Authorized AmountAuthorized stock repurchase amountNoncontrolling Interest [Table]Noncontrolling Interest [Line Items]Represents the conversion ratio of common stock.Common Stock Conversion RatioCommon stock conversion ratio (as a percent)Net Income (Loss) Attributable to Noncontrolling Interest [Abstract]Net income and the effects of changes in noncontrolling interestNot applicable.Cash Portion of Gain (Loss) on Mortgage Loans Held For Sale [Abstract]Cash loss:Represents the cash portion of gains (losses) on sale of mortgage loans held for sale determined by subtracting the purchase price of the mortgage loan from the proceeds received on sale.Gain (Loss) on Sale of Mortgage Loans Held For Sale Cash PortionLoansRepresents the cash portion of gains (losses) on hedging activities of mortgage loans held for sale.Mortgage Loan Held For Sale Hedging Activities Cash Gain LossHedging activitiesThe amount of net cash gains (losses) on sale of mortgage loans held for sale, net of cash results from hedging activities.Aggregate Cash Gain (Loss) on Sale of Mortgage Loans Held For Sale Net of Cash Hedging ResultsCash gain (loss), net of effects of cash hedging, on sale of loans held for saleNon Cash Portion of Gain (Loss) on Mortgage Loans Held For Sale [Abstract]Non-cash gain:Represents the receipt of mortgage servicing rights (MSRs), net of accruals for mortgage servicing liabilities, as proceeds from sales of loans.Receipt Of Mortgage Servicing Rights Accrual Of Mortgage Servicing Liabilities Net As Proceeds From Sales Of LoansMortgage servicing rights and mortgage servicing liabilities resulting from loan salesNot available.Change in Fair Value of Mortgage Loans and Related Hedging Instruments Still Held at Period End [Abstract]Change in fair value relating to loans and derivatives held at year end:The gains (losses) that represent change in fair value of commitments to purchase or originate mortgage loans at specified interest rates.Change in Fair Value of Commitments to Purchase LoansInterest rate lock commitmentsRepresents the change in fair value relating to mortgage loans still held at period end.Change in Fair Value Relating to Mortgage Loans Still Held at Period EndLoansRepresents the change in fair value hedging instruments still held at period end.Change in Fair Value Hedging Instruments Still Held at Period EndHedging derivativesRepresents the recapture of mortgage servicing rights (MSRs) and excess servicing spreads (ESS) payable to affiliate pursuant to an agreement requiring the affiliate to compensate the entity for refinancing by the affiliate of mortgage loans in the Company's MSR portfolio and subserviced by the affiliate.Recapture Of Mortgage Servicing Rights MSRs And Excess Servicing Spreads ESS Payable To AffiliateRecapture payable to PennyMac Mortgage Investment TrustInterest Income, Money Market DepositsCash and short-term investmentsInterest and Fee Income, Loans Held-for-sale, MortgagesLoans held for sale at fair valuePlacement fees earned on funds deposited into accounts that are managed by a custodian.Interest Income, Custodial FundsPlacement fees relating to custodial fundsAmount of operating interest income, including but not limited to, amortization and accretion of premiums and discounts on securities, and excluding interest income from related parties.Interest Income Operating Excluding Related PartiesInterest income, excluding related partiesRepresents interest expense incurred relating to the repayment of mortgage loans underlying mortgage-backed securities serviced by the company whereby the borrower repaid their mortgage loan during the month and the company is responsible for passing through the entire month's interest regardless of the date of borrower repayment.Interest Expense Shortfall On RepaymentsInterest shortfall on repayments of mortgage loans serviced for Agency securitizationsRepresents interest paid to mortgagees relating to the balances placed in their impound accounts during the reporting period.Interest Expense, Mortgage Loan Impound DepositsInterest on mortgage loan impound depositsRepresents repurchase agreement incentives recorded.Repurchase Agreements Incentives AmountIncentives recordedSchedule of Share-based Compensation Arrangements by Share-based Payment Award [Table]Award Type [Axis]Share Based Compensation Arrangements By Share Based Payment Award Award Type And Plan Name [Domain]Equity Award [Domain]Employee Stock Option [Member]Stock OptionsRestricted Stock Units R S U [Member]RSUsStock units that the entity has not yet issued because the agreed-upon consideration, such as employee services, has not yet been received.Performance Based Restricted Stock Units R S U [Member]Performance-based RSUsStock units that the entity has not yet issued because the agreed-upon consideration, such as employee services, has not yet been received.Time Based Restricted Stock Units R S U [Member]Time-based RSUsShare-based Compensation Arrangement by Share-based Payment Award [Line Items]Stock-Based CompensationShare-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Grants in PeriodGranted (in units)Share-based Compensation Arrangement by Share-based Payment Award, Options, Grants in Period, GrossGranted (in units)Fair value of share-based payments awards other than options granted.Share Based Compensation Arrangement By Share Based Payment Award Equity Instruments Other Than Options Grants In Period Total Fair ValueGrant date fair valueFair value of share-based payments awards options granted.Share Based Compensation Arrangement By Share Based Payment Award Equity Instruments Options Grants In Period Total Fair ValueGrant date fair valueFair value of share-based payments awards options and other than options granted.Share Based Compensation Arrangement By Share Based Payment Award Equity Instruments Options And Equity Instruments Other Than Options Grants In Period Total Fair ValueGrant date fair valueShare-based Compensation Arrangement by Share-based Payment Award, Equity Instruments Other than Options, Vested in PeriodVested (in units)Number of options exercised.Sharebased Compensation Arrangement By Sharebased Payment Award Options Exercised Number Of SharesExercised (in units)Allocated Share-based Compensation ExpenseStock-based compensation expenseEarnings Per Share, Basic [Abstract]Basic earnings per share of common stock:Earnings Per Share, Diluted [Abstract]Diluted earnings per share of common stock:Represents the amount of effect of net income (loss) attributable to stock based compensation units exchanged into Class A common units, net of taxes.Dilutive Securities Effect Of Net Income Loss Attributable To Stock Based Compensation Units Exchanged Into Common Units Net Of TaxNet income attributable to dilutive stock-based compensation unitsRepresents the amount of effect of net income (loss) attributable to noncontrolling interest, net of tax.Dilutive Securities Effect of Net Income (Loss)Attributable to Noncontrolling Interest, Net of TaxEffect of net income attributable to noncontrolling interest, net of taxNet Income (Loss) Available to Common Stockholders, DilutedNet income attributable to common stockholders for diluted earnings per shareIncremental Weighted Average Shares Attributable to Dilutive Effect [Abstract]Effect of dilutive shares:Dilutive Securities, Effect on Basic Earnings Per Share, Options and Restrictive Stock UnitsCommon shares issuable under stock-based compensation planRepresents shares issuable to PNMAC unitholders upon conversion of their units to PFSI shares.Incremental Common Shares Attributable to Exchangeable UnitsPennyMac Class A units exchangeable to common stockAntidilutive Securities Excluded from Computation of Earnings Per Share, AmountTotal anti-dilutive stock-based compensation unitsWeighted-average exercise price of securities outstanding but not included in the computation of earnings per share because their inclusion would be anti-dilutive.Share-based Compensation Arrangement by Share-based Payment Award, Options, Antidilutive Excluded from Computation of Earnings per Share Amount, Weighted Average Exercise PriceWeighted-average exercise price of anti-dilutive stock optionsInterest Paid, NetCash paid for interestIncome Taxes Paid, NetCash paid for income taxes (refunds received), netAdditional Cash Flow Elements, Investing Activities [Abstract]Non-cash investing activity:Represents the receipt of mortgage servicing rights (MSRs) as proceeds from sales of loans.Receipt of Mortgage Servicing Rights as Proceeds from Sales of LoansMortgage servicing rights resulting from loan salesRepresents the unsettled portion of acquisitions relating to MSRs by the Company.Mortgage Servicing Rights M S Rs Unsettled Portion Of AcquisitionsUnsettled portion of MSR acquisitionsAdditional Cash Flow Elements, Financing Activities [Abstract]Non-cash financing activity:Schedule of Compliance with Regulatory Capital Requirements for Mortgage Companies [Table]Regulatory Capital Requirements for Mortgage Companies, by Secondary Market Investor [Axis]Secondary Market Investor [Domain]Secondary Market Investor [Domain]Represents information pertaining to both Fannie Mae and Freddie Mac.Fannie Mae Freddie Mac [Member]Fannie Mae / Freddie Mac - PLSRepresents information pertaining to Government National Mortgage Association Issuer - PLS.Government National Mortgage Association Issuer P L S [Member]Ginnie Mae - PLSRepresents information pertaining to Government National Mortgage Association Issue's parent - PNMAC.Government National Mortgage Association Issuers Parent P N M A C [Member]Ginnie Mae - PennyMacRepresents information pertaining to U.S. Department of Housing and Urban Development - PLS.U S Department Of Housing And Urban Development P L S [Member]HUD - PLSRepresents information pertaining to the Federal Housing Finance Agency.Federal Housing Finance Agency [Member]Federal Housing Finance AgencyCompliance with Regulatory Capital Requirements for Mortgage Companies [Line Items]Regulatory Net Worth and Agency Capital RequirementsCapitalNet worthThe eligibility requirement spread added to the net worth requirement, as a percent of the Company's total servicing portfolio, required by the Federal Housing Finance Agency.Federal Housing Finance Agency Net Worth Requirement Spread as a Percent of Company's Servicing PortfolioFHFA net worth requirement spreadThe liquidity requirement spread of the aggregate unpaid principal balance serviced, required by the Federal Housing Finance Agency.Federal Housing Finance Agency Liquidity Requirement Spread of Aggregate Unpaid Principal Balance ServicedFHFA liquidity spread of UPB servicedThe liquidity requirement additional spread of the total non-performing unpaid principal balance in excess of 6.0%.Federal Housing Finance Agency Liquidity Requirement Additional Spread of Total Non-performing Unpaid Principal Balance in Excess of Six PercentFHFA additional liquidity spread of UPB in excess of 6%Minimum Net Worth Required for ComplianceCapital RequirementThe amount of total liquidity as defined in the regulations.LiquidityThe lowest amount of liquidity required by secondary market investors or state-imposed regulatory mandates.Minimum Liquidity Required for ComplianceLiquidity requirementThe tangible net worth to total assets ratio actual.Tangible Net Worth Total Assets Ratio ActualTangible net worth / Total assets ratio actualThe tangible net worth to total assets ratio requirement.Tangible Net Worth Total Assets Ratio RequirementTangible net worth / Total assets ratio requirementSchedule of Segment Reporting Information, by Segment [Table]Consolidation Items [Axis]Consolidation Items [Domain]Consolidation Items [Domain]Operating Segments [Member]Operating segmentSegments [Axis]Segment [Domain]Segments [Domain]Represents information pertaining to the investment management segment of the entity.Investment Management [Member]Investment managementSegment Reporting Information [Line Items]Segments and Related InformationNumber of Operating SegmentsNumber of segmentsAmount of the cost of borrowed funds accounted for as interest expense. This amount excludes non-segment activities.Interest Expense Before Non Segment ActivitiesInterest expense, before non-segment activitiesThe net amount of operating interest income (expense). This amount excludes non-segment activities.Interest Income Expense Net Before Non Segment ActivitiesNet interest expense, before non-segment activities