Exhibit 14.1

CODE OF ETHICS



For: GSAM  GST  GSVIT
 GST II  GSAM BDCs  Closed-End Funds  ETF Trust

Effective Date:
December 11, 2017

Revision History

While affirming their confidence in the integrity and good faith of all of its officers and trustees,1 Goldman Sachs Trust, Goldman Sachs Variable Insurance Trust, Goldman Sachs Trust II, Goldman Sachs ETF Trust (together, the Trusts), Goldman Sachs BDC, Inc. and other business development
companies advised by Goldman Sachs Asset Management, L.P. (together, the GSAM BDCs), and the Goldman Sachs Closed-End Funds (the Closed-End Funds
and together with the Trusts and GSAM BDCs, the Registrants) recognize that the knowledge of present or future portfolio transactions and, in certain instances, the power to influence portfolio transactions which may be possessed by
certain of its officers and trustees could place such individuals, if they engage in personal securities transactions, in a position where their personal interest may conflict with that of the Registrants. In view of the foregoing and of the
provisions of Rule 17j-1(b)(1) under the Investment Company Act of 1940, as amended (the Investment Company Act), the Registrants have adopted this Code of Ethics to specify and prohibit
certain types of personal securities transactions deemed to create conflicts of interest and to establish reporting requirements and enforcement procedures.

This Code is divided into five parts. The first part contains provisions applicable to Access Persons (as defined below) of the Registrants
who are also Access Persons of Goldman Sachs & Co. LLC (GS&Co.), Goldman Sachs Asset Management, L.P. (GSAM) or Goldman Sachs Asset Management International (GSAMI) or GS Investment Strategies, LLC
(GSIS) (each of GSAM,GSAMI, GSIS or their advisory affiliates, each referred to herein as an Adviser and together, as the Advisers); the second contains certain general provisions; the third pertains to trustees who are
not interested persons of an Adviser or the Registrants; the fourth pertains to interested trustees who are Access Persons of one of the Registrants but not Access Persons of an Adviser; and the fifth contains record-keeping and other provisions. Each Adviser imposes stringent reporting requirements and restrictions on the personal securities transactions of its Access Persons. The Registrants have determined that the
high standards of ethics in the area of personal investing which have been established by each Adviser may, without change, be appropriately applied by the Registrants to those Access Persons of the Registrants who are also Access Persons of the
Advisers. Such persons may have frequent opportunities for knowledge of and, in some cases, influence over, Registrant portfolio transactions. In the experience of the



|1 | For purposes of this Code, board of trustees shall refer to any Board of Trustees, Board of
Directors or Board of Managers of a Registrant, as applicable. Furthermore, trustee shall refer to director, trustee or manager, as applicable.
|- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 1



---

Registrants, interested trustees who are not Access Persons of an Adviser and trustees who are not interested persons have comparatively less current knowledge and considerably less
influence over specific purchases and sales of securities by the Registrants. Therefore, this Code contains separate provisions applicable to such trustees.

Definitions.

As used herein, the following terms shall have the following meanings:



| | (1) | Access Person with respect to the Registrants means any trustee and officer of a Registrant.
Access Person with respect to GS&Co. means (because GS&Co. serves as distributor or placement agent, as applicable, of Goldman Sachs Trust, Goldman Sachs Trust II, Goldman Sachs Variable Insurance Trust, and privately traded GSAM
BDCs and unlisted Closed-End Funds and is primarily engaged in a business other than advising registered investment companies or other advisory clients) only those directors, officers and general partners of
GS&Co. who, in the ordinary course of business, make, participate in or obtain information regarding the purchase or sale of Covered Securities (as defined below) by Goldman Sachs Trust, Goldman Sachs Trust II, Goldman Sachs Variable Insurance
Trust, or privately traded GSAM BDCs and unlisted Closed-End Funds or whose functions or duties in the ordinary course of business relate to the making of any recommendations to any such Registrant regarding
the purchase or sale of Covered Securities. Access Person with respect to GSAM, GSAMI, and GSIS means any director, officer, general partner or Advisory Person of GSAM, GSAMI, and GSIS.
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | Advisory Person means: (i) any employee of GSAM, GSAMI, GSIS or their affiliates, (and any
director, officer, general partner or employee of any company in a control relationship to a Registrant, GSAM, GSAMI, GSIS or their advisory affiliates) who, in connection with his or her regular functions or duties, makes, participates in, or
obtains information regarding, the purchase or sale of a Covered Security by the Registrant, or whose functions relate to the making of any recommendations with respect to such purchases or sales; and (ii) any natural person in a control
relationship to a Registrant, GSAM, GSAMI, GSIS or their affiliates who obtains information concerning recommendations made on behalf of the Registrant with regard to the purchase or sale of a Covered Security.
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 2



---

| | (3) | Automatic Investment Plan means a program in which regular periodic purchases (or withdrawals) are
made automatically in (or from) investment accounts in accordance with a predetermined schedule and allocation. An Automatic Investment Plan includes a dividend reinvestment plan.
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (4) | Beneficial ownership of a security shall be interpreted in the same manner as it would be under
Rule 16a-1(a)(2) of the Securities Exchange Act of 1934, as amended (Exchange Act), in determining whether a person is the beneficial owner of a security for purposes of Section 16 of the
Exchange Act and the rules and regulations promulgated thereunder.
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (5) | Control has the same meaning as that set forth in Section 2(a)(9) of the Investment Company
Act. Section 2(a)(9) generally provides that control means the power to exercise a controlling influence over the management or policies of a company, unless such power is solely the result of an official position with such company.
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (6) | Covered Security has the meaning set forth in the Advisers Code of Ethics for the Access
Persons covered by that Code of Ethics. Otherwise, Covered Security means a security as defined in Section 2(a) (36) of the Investment Company Act, except that it does not include:
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (i) | direct obligations of the Government of the United States; (ii) bankers acceptances, bank
certificates of deposit, commercial paper and high quality short-term debt instruments (any instrument having a maturity at issuance of less than 366 days and that is in one of the two highest rating categories of a nationally recognized statistical
rating organization), including repurchase agreements; (iii) shares of registered open-end investment companies; and (iv)qualified tuition programs established pursuant to Section 529 of the Internal
Revenue Code of 1986 (529 Plans), including interests in pre-paid tuition 529 plans and college savings 529 plans.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (7) | Disinterested Trustee means a trustee of a Registrant who is not an interested person
of the Registrant within the meaning of Section 2(a)(19) of the Investment Company Act.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 3



---

| | (8) | Purchase or sale of a Covered Security includes, among other things, the writing of an option to
purchase or sell a Covered Security or any security that is exchangeable for or convertible into another security.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (9) | Review Officer means the officer of a Registrant or an Adviser designated from time to time to
receive and review reports of purchases and sales by Access Persons. The term Alternative Review Officer means the officer of the Registrant or an Adviser designated from time to time to receive and review reports of purchases and sales
by the Review Officer, and who shall act in all respects in the manner prescribed herein for the Review Officer. It is recognized that a different Review Officer and Alternative Review Officer may be designated with respect to a Registrant and each
of the Advisers.
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (10) | A security is being considered for purchase or sale by a Registrant when a recommendation to
purchase or sell a security has been made and communicated and, with respect to the person making the recommendation, when such person seriously considers making such a recommendation.
| | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (11) | A security is held or to be acquired if within the most recent 15 days it (i) is or has been
held by a Registrant, or (ii) is being or has been considered by an Adviser for purchase by the Registrant, and (iii) includes any option to purchase or sell and any security convertible into or exchangeable for a security described in
(i) or (ii).
| | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



|I. | RULES APPLICABLE TO ACCESS PERSONS OF A REGISTRANT WHO ARE ALSO ACCESS PERSONS OF THE ADVISERS
|-- | ----------------------------------------------------------------------------------------------



| | A. | Incorporation of Code of Ethics of the Advisers and GS&Co.
| | -- | ----------------------------------------------------------



| | (1) | The provisions of the Code of Ethics of the Advisers and GS&Co. are hereby incorporated herein by
reference as the Registrants Code of Ethics applicable to Access Persons of the Registrants who are also Access Persons of any of the Advisers or of GS&Co., as applicable, except as provided in
Section I-B hereof.
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 4



---

| | (2) | A violation of the Code of Ethics of the Advisers and GS&Co. shall constitute a violation of this Code.
| | --- | -------------------------------------------------------------------------------------------------------



| | B. | Reports.
| | -- | --------



| | (1) | Access Persons of the Advisers and GS& Co. shall file the initial holdings report, annual holdings report
and quarterly transaction reports required under the Code of Ethics of the Advisers and GS&Co. with the Review Officer, and the Review Officer shall submit his or her initial holdings report, annual holdings report and quarterly transaction
reports with respect to his or her personal securities holdings and transactions to the Alternative Review Officer.
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | With respect to Access Persons of the Advisers and GS&Co., to the extent provided in the Code of Ethics of
the Advisers and GS&Co., quarterly transaction reports shall be deemed made with respect to any account where such persons have made provision for transmittal of daily trading information regarding the account to be delivered to the designated
Review Officer for his or her review.
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | A report filed with the Review Officer (or, in the case of a report of the Review Officer, with the
Alternative Review Officer) shall be deemed to be filed with the Registrants.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



|II. | GENERAL
|--- | -------



| | A. | Legal Requirements. Section 17(j) of the Investment Company Act provides, among other things, that
it is unlawful for any affiliated person of a Registrant, including, among others, interested and Disinterested Trustees, to engage in any act, practice or course of business in connection with the purchase or sale, directly or indirectly, by such
affiliated person of any security held or to be acquired by a Registrant in contravention of such rules and regulations as the Securities and Exchange Commission (the Commission) may adopt to define and prescribe means reasonably
necessary to prevent such acts, practices or courses of business as are fraudulent, deceptive or manipulative. Pursuant to Section 17(j), the Commission has adopted Rule 17j-1 which provides, among
other things, that it is unlawful for any affiliated person of a Registrant in connection with the purchase or sale, directly or indirectly, by such person of a Covered Security held or to be acquired by the Registrant:
| | -- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (1) | To employ any device, scheme or artifice to defraud the Registrant;
| | --- | -------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 5



---

| | (2) | To make any untrue statement of a material fact to the Registrant or omit to state a material fact necessary
in order to make the statement made to the Registrant, in light of the circumstances under which they were made, not misleading;
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | To engage in any act, practice or course of business that operates or would operate as a fraud or deceit upon
the Registrant; or
| | --- | --------------------------------------------------------------------------------------------------------------------------------



| | (4) | To engage in any manipulative practice with respect to the Registrant.
| | --- | ----------------------------------------------------------------------



| | B. | Statement of Policy. It is the policy of each Registrant that no Access Person shall engage in any act,
practice or course of conduct that would violate the provisions of Rule 17j-1. The fundamental position of each Registrant is, and has been, that each Access Person shall place at all times the interests of
the Registrant and its shareholders first in conducting personal securities transactions. Accordingly, personal securities transactions by Access Persons of the Registrant must be conducted in a manner consistent with this Code and so as to avoid
any actual or potential conflict of interest or any abuse of an Access Persons position of trust and responsibility. Further, Access Persons should not take inappropriate advantage of their positions with or relationship to each relevant
Registrant.
| | -- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Without limiting in any manner the fiduciary duty owed by Access Persons to each relevant
Registrant or the provisions of this Code, it should be noted that each Registrant considers it proper that purchases and sales be made by its Access Persons in the marketplace of securities owned by the Registrant; provided, however, that such
personal securities transactions comply with the spirit of, and the specific restrictions and limitations set forth in, this Code. In making personal investment decisions with respect to any security, extreme care must be exercised by Access Persons
to ensure that the prohibitions of this Code are not violated. It bears emphasis that technical compliance with the procedures, prohibitions and limitations of this Code will not automatically insulate from scrutiny personal securities transactions
which show a pattern of abuse by an Access Person of his or her fiduciary duty to one or more Registrants.





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 6



---

| | C. | Exempted Transactions.
| | -- | ----------------------

The Statement of Policy set forth above shall be deemed not to be violated by and the prohibitions of Section III-A or IV-A of this Code shall not apply to:



| | (1) | Purchases or sales of securities effected for, or held in, any account over which the Access Person has no
direct or indirect influence or control;
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | Purchases or sales of securities which are not eligible for purchase or sale by the Registrant;
| | --- | -----------------------------------------------------------------------------------------------



| | (3) | Purchases or sales of securities which are non-volitional on the part
of either the Access Person or the Registrant;
| | --- | --------------------------------------------------------------------------------------------------------------------



| | (4) | Purchases or sales of securities which are part of an Automatic Investment Plan provided that no adjustment is
made by the Access Person to the rate at which securities are purchased or sold, as the case may be, under such a plan during any period in which the security is being considered for purchase or sale by the Registrant;
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (5) | Purchases of securities effected upon the exercise of rights issued by an issuer pro rata to all
holders of a class of its securities, to the extent such rights were acquired from such issuer, and sales of such rights so acquired;
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (6) | Tenders of securities pursuant to tender offers which are expressly conditioned on the tender offers
acquisition of all of the securities of the same class;
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (7) | Purchases or sales of publicly-traded shares of companies that have a market capitalization in excess of
$5 billion;
| | --- | --------------------------------------------------------------------------------------------------------------------



| | (8) | Chief Investment Officer (CIO) signature approved de minimis per day purchases or sales ($50,000
or less) of publicly traded shares of companies that have a 10-day average daily trading volume of at least $1 million, subject to the following additional parameters:
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 7



---

| | (a) | Access Persons must submit a current (same day) printout of a Yahoo Finance, Bridge or Bloomberg (or similar
service) screen with the minimum 10-day average daily trading volume information indicated;
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (b) | No Access Person (together with related accounts) may own more than
1⁄2 of 1% of the outstanding securities of an issuer;
| | --- | -------------------------------------------------------------------------------------------------------------------------



| | (c) | Multiple trades of up to $50,000 on different days are permitted so long as each day the trade is approved;
and
| | --- | ---------------------------------------------------------------------------------------------------------------



| | (d) | A security purchased pursuant to this exemption must be held for a minimum of 360 days prior to sale unless it
appears on the Advisers $5 billion Self Pre-Clearance Securities List or normal pre-clearance pursuant to Article VI of the Advisers Code of
Ethics is obtained, in which case the security must be held for at least 30 days prior to sale.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (9) | Purchases or sales of securities with respect to which neither an Access Person, nor any member of his or her
immediate family as defined in Rule 16a-1(c) under the Exchange Act, has any direct or indirect influence, control or prior knowledge, which purchases or sales are effected for, or held in, a blind
account. For this purpose, a blind account is an account over which an investment adviser exercises full investment discretion (subject to account guidelines) and does not consult with or seek the approval of the Access Person, or
any member of his or her immediate family, with respect to such purchases and sales.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (10) | Other purchases or sales which only remotely potentially impact the interest of the Registrant because the
securities transaction involves a small number of shares of an issuer with a large market capitalization and high average daily trading volume or would otherwise be very unlikely to affect a highly institutional market; and
| | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (11) | Purchases or sales of securities previously approved by an individual appointed from time to time by the
President for this purpose, which approval shall be confirmed in writing and shall be based upon a determination that such transaction did not violate the purpose or spirit of this Code.
| | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 8



---

|III. | RULES APPLICABLE TO DISINTERESTED TRUSTEES
|---- | ------------------------------------------



| | A. | Prohibited Purchases and Sales. While the scope of actions which may violate the Statement of Policy
set forth in Section II-B cannot be exactly defined, such actions would always include at least the following prohibited activities. No Disinterested Trustee shall purchase or sell, directly or indirectly, any
Covered Security in which he or she has, or by reason of such transaction acquires, any direct or indirect beneficial ownership if such trustee, at the time of the transaction, knows or, in the ordinary course of fulfilling his or her official
duties as a trustee of a Registrant, should have known that:
| | -- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (1) | during the 15-day period immediately preceding or after the date of
the contemplated transaction by the trustee, the Covered Security was or will be considered for purchase or sale by the Registrant;
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | during the 15-day period immediately preceding or after the date of
the contemplated transaction by the trustee, the Covered Security was or will be purchased or sold by the Registrant; or
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | with respect to the GSAM BDCs, during the 6 month period immediately preceding or after the date of the
contemplated transaction by the trustee, the Covered Security will be considered for purchase or matured, was repaid, or disposed of by the Registrant.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

provided that, because monitoring the publication of the portfolio holdings of series of Goldman Sachs ETF Trust is not
construed to be within the ordinary course of fulfilling the duties of a trustee, the publication or availability of such portfolio holdings shall not be construed to impart actual or constructive knowledge of such series portfolio
transactions on a trustee.



| | B. | Reporting
| | -- | ---------



| | (1) | Every Disinterested Trustee shall file with the Review Officer or his or her designee a report containing the
information described below in Section III-B(2) of this Code with respect to transactions in any Covered Security in which such Disinterested Trustee has, or by reason of such transaction acquires or
disposes of, any direct or indirect beneficial ownership, whether or not one of the exemptions listed in Section II-C applies; provided, however, that a
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |       
|----------------- |  | ------
|December 11, 2017 |  | Page 9



---

| |  | Disinterested Trustee shall not be required to file a report: (a) unless such trustee, at the time of the
transaction, knew or, in the ordinary course of fulfilling his or her official duties as a trustee of a Registrant, should have known that, during the 15-day period immediately preceding or after the date of
the transaction by the Trustee: (i) such Covered Security was or would be purchased or sold by the Registrant; or (ii) such Covered Security was being considered for purchase or sale by the Registrant or an Adviser for a portfolio of the
Registrant (see proviso in Section III-A regarding publication of portfolio holdings of series of Goldman Sachs ETF Trust); (b) unless, with respect to Disinterested Trustees of a GSAM BDC, such trustee,
at the time of the transaction, knew or in the ordinary course of fulfilling his or her official duties as a trustee of the relevant Registrant, should have known, that during the 6-month period immediately
preceding or after the date of the transaction by the Trustee (i) such Covered Security was or would be purchased, was held, matured, was repaid or disposed of by the Registrant; or (c) with respect to transactions effected for any account
over which such person does not have any direct or indirect influence or control. Notwithstanding the preceding sentence, any Disinterested Trustee may, at his or her option, report the information described in
Section III-B(2) with respect to any one or more transactions in any Covered Security in which such person has, or by reason of the transaction acquires or disposes of, any direct or indirect beneficial
ownership.
| |  | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | Quarterly Transaction and New Account Reports. Every report shall be made not later than 30 days
after the end of the calendar quarter in which the transaction to which the report related was effected, and shall contain the following information:
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (a) | The date of the transaction, the title, the interest rate and maturity date (if applicable), the class and
number of shares, and the principal amount of each Covered Security involved;
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (b) | The nature of the transaction (i.e., purchase, sale or any other type of acquisition or disposition);
| | --- | -----------------------------------------------------------------------------------------------------



| | (c) | The price of the Covered Security at which the transaction was effected;
| | --- | ------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 10



---

| | (d) | The name of the broker, dealer or bank with or through whom the transaction was effected;
| | --- | -----------------------------------------------------------------------------------------



| | (e) | The date that the report is submitted; and
| | --- | ------------------------------------------



| | (f) | With respect to any account established by a Disinterested Trustee in which any securities were held during
the quarter for the direct or indirect benefit of the Disinterested Trustee or Director:
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (i) | The name of the broker, dealer or bank with whom the Disinterested Trustee established the account;
| | --- | ---------------------------------------------------------------------------------------------------



| | (ii) | The date the account was established; and
| | ---- | -----------------------------------------



| | (iii) | The date that the report was submitted by the Disinterested Trustee.
| | ----- | --------------------------------------------------------------------



| | (3) | Every report concerning a purchase or sale prohibited under Section
III-A hereof with respect to which the reporting person relies upon one of the exemptions provided in Section II-C shall contain a brief statement of the exemption
relied upon and the circumstances of the transaction.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (4) | Any such report may contain a statement that the report shall not be construed as an admission by the person
making such report that (a) he or she has any direct or indirect beneficial ownership in the Covered Security to which the report relates (a Subject Security) or (b) he or she knew or should have known that, within the 15-day period described in Section III-B(1) above, a Subject Security was or would be purchased or sold, or considered for purchase or sale, by the Registrant or with
respect to Disinterested Trustees of a GSAM BDC, he or she knew or should have known that, within the 6-month period described in Section III-B(1), a Subject Security
will be purchased, held or has matured or was repaid or disposed of by the Registrant.
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 11



---

|IV. | RULES APPLICABLE TO INTERESTED TRUSTEES WHO ARE NOT ACCESS PERSONS OF THE ADVISERS
|--- | ----------------------------------------------------------------------------------



| | A. | Prohibited Purchases and Sales.
| | -- | -------------------------------

While the scope of actions which may violate the Statement of Policy set forth in Section
II-B cannot be exactly defined, such actions would always include at least the following prohibited activities.



| | (1) | No interested trustee who is not an Access Person of an Adviser (Section IV Reporting Person)
shall purchase or sell, directly or indirectly, any Covered Security in which he or she has, or by reason of such transaction acquires, any direct or indirect beneficial ownership and which to his or her actual knowledge at the time of such purchase
or sale the Covered Security:
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (a) | is being considered for purchase or sale by the Registrant; or
| | --- | --------------------------------------------------------------



| | (b) | is being purchased or sold by an investment company.a Registrant; or
| | --- | --------------------------------------------------------------------



| | (c) | with respect to the GSAM BDCs, during the 6-month period immediately
preceding the date of the contemplated transaction by the trustee, the Covered Security matured, was repaid, or disposed of by the Registrant.
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | No Section IV Reporting Person shall reveal to any other person (except in the normal course of his or her
duties on behalf of a Registrant) any information regarding securities transactions by an investment company or consideration by an investment company or the Adviser of any such securities transaction.
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | No Section IV Reporting Person shall engage in, or permit anyone within his or her control to engage in, any
act, practice or course of conduct which would operate as a fraud or deceit upon, or constitute a manipulative practice with respect to a Registrant or any issuer of any Covered Security owned by an investment company.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 12



---

| | B. | Reporting.
| | -- | ----------



| | (1) | Every Section IV Reporting Person shall report to the Review Officer the information (a) described in Section IV-B(3) of this Code with respect to transactions in any Covered Security in which such Section IV Reporting Person has, or by reason of such transaction acquires or disposes of, any direct or indirect
beneficial ownership in the Covered Security or (b) described in Section IV-B(4) and IV-B(5) of this Code with respect to securities holdings beneficially owned by
each Section IV Reporting Person.
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | Notwithstanding Section IV-B(1) of this Code, Section IV Reporting Persons need not make a quarterly
transaction report where the report would duplicate information contained in broker trade confirmations or account statements received by a Registrant or an Adviser in the time period prescribed in Section
IV-B(3).
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | Quarterly Transaction Reports.Unless quarterly transaction reports are deemed to have been made under Section IV-B(2) of this Code, every quarterly transaction report shall be made not later than 30 days after the end of the calendar quarter in which the transaction to which the report relates was effected, and
shall contain the following information:
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (a) | The date of the transaction, the title, the interest rate and maturity date (if applicable), the class and
number of shares, and the principal amount of each Covered Security involved;
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (b) | The nature of the transaction (i.e., purchase, sale or any other type of acquisition or disposition);
| | --- | -----------------------------------------------------------------------------------------------------



| | (c) | The price of the Covered Security at which the transaction was effected;
| | --- | ------------------------------------------------------------------------



| | (d) | The name of the broker, dealer or bank with or through whom the transaction was effected;
| | --- | -----------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 13



---

| | (e) | The date that the report was submitted by a Section IV Reporting Person; and
| | --- | ----------------------------------------------------------------------------



| | (f) | With respect to any account established by the Section IV Reporting Person in which any securities were held
during the quarter for the direct or indirect benefit of the Section IV Reporting Person:
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (i) | The name of the broker, dealer or bank with whom the Section IV Reporting Person established the account;
| | --- | ---------------------------------------------------------------------------------------------------------



| | (ii) | The date the account was established; and
| | ---- | -----------------------------------------



| | (iii) | The date that the report was submitted by the Section IV Reporting Person.
| | ----- | --------------------------------------------------------------------------



| | (4) | Initial Holdings Reports. No later than 10 days after becoming a Section IV Reporting Person, each
Section IV Reporting Person must submit a report containing the following information (which information must be current as of a date no more than 45 days before becoming a Section IV Reporting Person):
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (a) | The title, number of shares and principal amount of each Covered Security in which the Section IV Reporting
Person had any direct or indirect beneficial ownership when the person became a Section IV Reporting Person;
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (b) | The name of any broker, dealer or bank with whom the Section IV Reporting Person maintained an account in
which any securities were held for the direct or indirect benefit of the Section IV Reporting Person as of the date the person became a Section IV Reporting Person; and
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (c) | The date that the report is submitted by the Section IV Reporting Person.
| | --- | -------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 14



---

| | (5) | Annual Holdings Reports. Between January 1st and
January 30th of each calendar year, every Section IV Reporting Person shall submit the following information (which information must be current as of a date no more than 45 days before the report
is submitted):
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (a) | The title, number of shares and principal amount of each Covered Security in which the Section IV Reporting
Person had any direct or indirect beneficial ownership;
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (b) | The name of any broker, dealer or bank with whom the Section IV Reporting Person maintains an account in which
any Covered Securities are held for the direct or indirect benefit of the Section IV Reporting Person; and
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (c) | The date that the report is submitted by the Section IV Reporting Person.
| | --- | -------------------------------------------------------------------------



| | (6) | These reporting requirements shall apply whether or not one of the exemptions listed in Section II-C applies except that an Section IV Reporting Person shall not be required to make a report with respect to securities transactions effected for, and any Covered Securities held in, any account over
which such Section IV Reporting Person does not have any direct or indirect influence or control. Every report concerning a securities transaction with respect to which the reporting person relies upon one of the exemptions provided in Section II-C shall contain a brief statement of the exemption relied upon and the circumstances of the transaction.
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (7) | Any such report may contain a statement that the report shall not be construed as an admission by the person
making such report that (a) he or she has or had any direct or indirect beneficial ownership in the Covered Security to which the report relates (a Subject Security) or (b) he or she knew or should have known that the Subject
Security was being purchased or sold, or considered for purchase or sale, by an investment company on the same day.
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 15



---

|V. | MISCELLANEOUS
|-- | -------------



| | A. | Approval of Code of Ethics and Amendments to the Code of Ethics. The board of trustees, including a
majority of the Disinterested Trustees, shall approve this Code of Ethics, and any material amendments to this Code of Ethics on behalf of the Registrant that it oversees. Such approval must be based on a determination that this Code of Ethics
contains provisions reasonably necessary to prevent Access Persons of the relevant Registrant from engaging in any conduct prohibited under this Code of Ethics and under Rule 17j-1 under the Investment Company
Act. Before approving any material amendments to this Code, each board must receive certification from the relevant Registrant that it has adopted procedures reasonably necessary to prevent Access Persons from violating this Code.
| | -- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | B. | Annual Certification of Compliance. Each Access Person shall certify to the Review Officer annually
that he or she (i) has read and understands this Code of Ethics and any procedures that are adopted by the Registrants related to this Code and recognizes that he or she is subject thereto, (ii) has complied with the requirements of this
Code of Ethics and such procedures and (iii) has disclosed or reported all personal securities transactions and beneficial holdings in Covered Securities required to be disclosed or reported pursuant to the requirements of this Code of Ethics
and any related procedures.
| | -- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | C. | Review of Reports.
| | -- | ------------------



| | (1) | The Review Officer or his or her designee shall compare the reported personal securities transactions of each
Access Person with completed and contemplated portfolio transactions of the Registrants to determine whether any transactions that violate this Code may have occurred (a Reviewable Transaction). In the case of reports of personal
securities transactions of the Review Officer, the Alternative Review Officer shall perform such comparison. Before making any determination that a violation has been committed by any Access Person, the Review Officer (or Alternative Review Officer,
as the case may be) shall provide such Access Person an opportunity to supply additional explanatory material for the purposes of demonstrating that such transactions did not violate this Code.
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 16



---

| | (2) | With respect to Disinterested Trustees, if the Review Officer determines that a Reviewable Transaction may
have occurred, he or she shall submit the report and pertinent information concerning completed or contemplated portfolio transactions of the Registrant to counsel for the Disinterested Trustees. Such counsel shall determine whether a violation of
this Code may have occurred, taking into account all the exemptions provided under Section II-C. Before making any determination that a violation has been committed by a Disinterested Trustee, such counsel
shall give the Disinterested Trustee an opportunity to supply additional information regarding the transaction in question.
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | With respect to Access Persons who are not Disinterested Trustees, if the Review Officer determines that a
Reviewable Transaction may have occurred, he or she shall submit his or her written determination, together with the confidential quarterly report and any additional explanatory material provided by the Access Person, to the President of each
Registrant (or any Vice President of such Registrant if the actions of the President are at issue), who shall make an independent determination of whether a violation of this Code has occurred.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | D. | Board Reports. On an annual basis, the Review Officer shall prepare for the board of trustees and the
board of trustees shall consider:
| | -- | ---------------------------------------------------------------------------------------------------------------------------------------



| | (1) | A report which describes any issues arising under this Code or any related procedures adopted by the
Registrants, including without limitation information about material violations of this Code or any related procedures and sanctions imposed in response to material violations. An Alternative Review Officer shall prepare reports with respect to
compliance by the Review Officer.
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | A report identifying any recommended changes to existing restrictions or procedures based upon the
Registrants experience under this Code, evolving industry practices and developments in applicable laws or regulations; and
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | A report certifying to the board of trustees that the Registrant has adopted procedures that are reasonably
necessary to prevent Access Persons from violating this Code of Ethics.
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 17



---

| | E. | Sanctions.
| | -- | ----------



| | (1) | With respect to Disinterested Trustees, if counsel for the Disinterested Trustees determines that a violation
of this Code has occurred, counsel shall so advise the President of each relevant Registrant and a committee consisting of the Disinterested Trustees, other than the Disinterested Trustee whose transaction is under consideration, and shall provide
the committee with the report, the record of pertinent actual or contemplated portfolio transactions of the Registrant and any additional material supplied by such Disinterested Trustee. The committee, at its option, shall either impose such
sanction(s) as it deems appropriate or refer the matter to the board of trustees, which shall impose sanction(s) the board deems appropriate.
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | With respect to Access Persons who are not Disinterested Trustees, if the President (or a Vice President, as
the case may be) finds that a violation of this Code has occurred, he or she shall impose such sanctions as he or she deems appropriate and shall report the violation and the sanction(s) imposed to the board of trustees of the relevant Registrant.
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (3) | Sanctions for violation of this Code include, but are not limited to, one or more of the following: removal or
suspension from office, termination of employment, a letter of censure and/or restitution to each effected Registrant of an amount equal to the advantage that the offending person gained by reason of such violation. In addition, as part of any
sanction, the Access Person may be required to reverse the trade(s) at issue and forfeit any profit or absorb any loss from the trade. It is noted that violations of this Code by an Access Person may also result in criminal prosecution or civil
action.
| | --- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 18



---

| | F. | Amendments to Code of Ethics of the Advisers and GS&Co. Any material amendment to the Code of
Ethics of the Advisers and GS&Co. shall be deemed an amendment to Section I-A of this Code and must be approved by the board of trustees of each
Registrant2 no later than six months after the adoption of the material change. Before approving any material amendments to the Code of Ethics of the Advisers and GS&Co., the board must
receive a certification from the Advisers and GS&Co. that they have adopted procedures reasonably necessary to prevent Access Persons from violating the Code of Ethics of the Advisers and GS&Co.
| | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | G. | Records. Each Registrant shall maintain records in the manner and to the extent set forth below, which
records may be maintained electronically or on microfilm or similar medium under the conditions described in Rule 31a-2(f)(1) and Rule 17j-1 under the Investment Company
Act and shall be available for examination by representatives of the Commission.
| | -- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (1) | A copy of this Code and any other code which is, or at any time within the past five years has been, in effect
shall be preserved for a period of not less than five years in an easily accessible place;
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (2) | A record of any violation of this Code and of any action taken as a result of such violation shall be
preserved in an easily accessible place for a period of not less than five years following the end of the fiscal year in which the violation occurs;
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|2 | Board approval of material amendments to a principal underwriters Code of Ethics is required by Rule 17j-1(c)(1) under the Investment Company Act. However, because the Closed-End Funds and GSAM BDCs do not have continuous relationships with a principal underwriter or
placement agent, as applicable, the boards of those Registrants are only required to approve material amendments to such persons Code of Ethics made during the existence of a principal underwriting or placement agency relationship. GS&Co.
(which serves as placement agent for unlisted Closed-End Funds and privately traded GSAM BDCs and from time to time serves as principal underwriter to certain listed
Closed-End Funds and publicly traded GSAM BDCs) and the Advisers (one or more of which advise each of the Closed-End Funds and GSAM BDCs) are subject to the same Code of
Ethics. Accordingly, in practice, the boards of the Closed-End Funds and GSAM BDCs will nevertheless review and approve material amendments to the Code of Ethics of GS&Co., on an ongoing basis (as provided
in Section V.F.) in fulfilling their responsibility to review and approve material amendments to the Code of Ethics of the Advisers. GS&Co. does not serve as principal underwriter to Goldman Sachs ETF Trust.
|- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 19



---

| | (3) | A copy of each initial holdings report, annual holdings report and quarterly transaction report made by an
Access Person pursuant to this Code (including any information provided under Section IV-B(2)) shall be preserved for a period of not less than five years from the end of the fiscal year in which it is made,
the first two years in an easily accessible place;
| | --- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (4) | A list of all persons who are, or within the past five years have been, required to make initial holdings,
annual holdings or quarterly transaction reports pursuant to this Code shall be maintained in an easily accessible place;
| | --- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (5) | A list of all persons, currently or within the past five years who are or were responsible for reviewing
initial holdings, annual holdings or quarterly transaction reports shall be maintained in an easily accessible place; and
| | --- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | (6) | A copy of each report required by Section V-D of this Code must be
maintained for at least five years after the end of the fiscal year in which it was made, the first two years in an easily accessible plan.
| | --- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | H. | Confidentiality. All reports of securities transactions, holdings reports and any other information
filed with a Registrant pursuant to this Code shall be treated as confidential, except that reports of securities transactions hereunder will be made available to the Commission or any other regulatory or
self-regulatory organization to the extent required by law or regulation or to the extent the Registrant considers necessary or advisable in cooperating with an investigation or inquiry by the Commission or
any other regulatory or self-regulatory organization.
| | -- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | I. | Interpretation of Provisions. The board of trustees may from time to time adopt such interpretations of
this Code as it deems appropriate.
| | -- | ------------------------------------------------------------------------------------------------------------------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 20



---

| | J. | Exceptions to the Code. Although exceptions to this Code will rarely, if ever, be granted, a designated
officer of a Registrant, after consultation with the Review Officer, may make exceptions on a case by case basis, from any of the provisions of this Code upon a determination that the conduct at issue involves a negligible opportunity for abuse or
otherwise merits an exception from this Code. All such exceptions must be received in writing by the person requesting the exception before becoming effective. The Review Officer shall report any exception to the board of trustees of the Registrant
at the next regularly scheduled board meeting.
| | -- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| | K. | Identification of Access Persons. The Review Officer shall identify all persons who are considered to
be Access Persons and shall inform such persons of their respective duties and provide them with copies of this Code and any related procedures adopted by the Registrants.
| | -- | -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Revision History



| |  |  | December 11, 2017 (Addition of GST, GSVIT, Goldman Sachs Private Markets Fund 2018 LLC, Goldman Sachs
Private Markets Fund 2018 (A) LLC, Goldman Sachs Private Markets Fund 2018 (B) LLC, and GSAM BDCs, clarification of certain defined terms, board approval requirements, and exempted transactions)
| | - |  | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------



| |  |  | April 28, 2017 (GS&Co. Legal name change)
| | - |  | -----------------------------------------



| |  |  | April 16, 2015 (Addition of Goldman Sachs ETF Trust)
| | - |  | ----------------------------------------------------



| |  |  | August 14, 2014 (Addition of Goldman Sachs MLP and Energy Renaissance Fund)
| | - |  | ---------------------------------------------------------------------------



| |  |  | October 17, 2013 (Addition of Goldman Sachs MLP Income Opportunities Fund)
| | - |  | --------------------------------------------------------------------------



| |  |  | April 16, 2013 (Initial Approval)
| | - |  | ---------------------------------





|                  |  |        
|----------------- |  | -------
|December 11, 2017 |  | Page 21